94% add-to-post

Code Review | Add To Post

WordPress plugin Add To Post scored 94% from 54 tests.

About plugin

  • Plugin page: add-to-post
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.3.2
  • WordPress version: 5.9.2
  • First release: May 10, 2012
  • Latest release: May 10, 2012
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: HowWhoWhen (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active / 10,385 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼301.92ms] Passed 4 tests

An overview of server-side resources used by Add To Post
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0254.13 ▲4.53
Dashboard /wp-admin3.42 ▲0.0232.66 ▼1.48
Posts /wp-admin/edit.php3.66 ▲0.0235.76 ▲1.73
Add New Post /wp-admin/post-new.php6.89 ▼0.0889.21 ▼1,206.39
Media Library /wp-admin/upload.php3.31 ▲0.0125.76 ▼1.53
Add To Post /wp-admin/options-general.php?page=add-to-post3.2822.95

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Add To Post
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,788 ▲3415.86 ▲0.085.80 ▼0.252.42 ▼0.16
Dashboard /wp-admin2,897 ▲396.15 ▲0.06122.75 ▼15.03162.52 ▲2.05
Posts /wp-admin/edit.php2,696 ▲53.24 ▲0.0064.95 ▲0.16141.40 ▲0.84
Add New Post /wp-admin/post-new.php1,761 ▲10021.93 ▲5.65443.48 ▲33.79158.96 ▲5.61
Media Library /wp-admin/upload.php1,703 ▲55.48 ▼0.04140.53 ▼9.38185.58 ▼2.51
Add To Post /wp-admin/options-general.php?page=add-to-post1,0592.3653.82112.93

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/add-to-post/add-to-post.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test


Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Plugin Activation), #2 (Plugin Settings Page), #3 (Example Usage)
Please take inspiration from this readme.txt

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

The entry point to "Add To Post" version 1.0 is a PHP file that has certain tags in its header comment area
107 characters long description:
Add To Post allows you to add additional content to either the start, end or both areas of your blog posts.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin60 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions4100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.08MB with 0.04MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png27.79KB12.69KB▼ 54.33%
screenshot-3.png23.46KB10.75KB▼ 54.17%
screenshot-1.png26.98KB11.56KB▼ 57.17%