84% code-to-post

Code Review | Code To Post

WordPress plugin Code To Post scored 84% from 54 tests.

About plugin

  • Plugin page: code-to-post
  • Plugin version: 0.1.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.3.1
  • WordPress version: 6.3.1
  • First release: Jul 17, 2019
  • Latest release: Dec 13, 2019
  • Number of updates: 14
  • Update frequency: every 10.7 days
  • Top authors: ryutasakai (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 617 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼2.21ms] Passed 4 tests

This is a short check of server-side resources used by Code To Post
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0443.63 ▲3.76
Dashboard /wp-admin3.35 ▲0.0447.77 ▼1.51
Posts /wp-admin/edit.php3.40 ▲0.0446.27 ▲0.58
Add New Post /wp-admin/post-new.php5.93 ▲0.0492.65 ▼11.66
Media Library /wp-admin/upload.php3.27 ▲0.0437.99 ▲4.10

Server storage [IO: ▲0.16MB] [DB: ▲0.00MB] Passed 3 tests

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Code To Post
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7013.14 ▼1.221.69 ▲0.0545.73 ▲3.62
Dashboard /wp-admin2,222 ▲314.85 ▼0.9794.73 ▼6.8139.65 ▼8.34
Posts /wp-admin/edit.php2,102 ▲102.04 ▲0.0540.19 ▲3.4036.23 ▲0.96
Add New Post /wp-admin/post-new.php1,554 ▲3718.44 ▲0.77631.08 ▲29.4755.56 ▲3.23
Media Library /wp-admin/upload.php1,404 ▲134.22 ▲0.01105.74 ▲10.3445.67 ▲0.94

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/code-to-post/code-to-post.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots lack descriptions #1, #2 in code-to-post/assets to your readme.txt
You can take inspiration from this readme.txt

code-to-post/code-to-post.php Passed 13 tests

The main PHP script in "Code To Post" version 0.1.4 is automatically included on every request by WordPress
34 characters long description:
Import static Html to post content

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected272 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP11714223
PO File1141649

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity30.00
▷ Minimum class complexity30.00
▷ Maximum class complexity30.00
Average method complexity3.36
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods18.33%
▷ Public methods758.33%
▷ Protected methods00.00%
▷ Private methods541.67%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants11
▷ Global constants00.00%
▷ Class constants11100.00%
▷ Public constants11100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.14MB with 0.10MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot02.png92.51KB28.50KB▼ 69.19%
assets/screenshot01.png54.37KB16.19KB▼ 70.22%