84% add-to-post

Code Review | Add To Post

WordPress plugin Add To Post scored84%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: 6.3.1
  • 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

100+ active /10,638 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by Add To Post
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.98 ▼2.15
Dashboard /wp-admin3.32 ▲0.0247.38 ▼5.82
Posts /wp-admin/edit.php3.37 ▲0.0149.82 ▲1.90
Add New Post /wp-admin/post-new.php5.90 ▲0.0194.48 ▼9.01
Media Library /wp-admin/upload.php3.24 ▲0.0133.94 ▼1.38
Add To Post /wp-admin/options-general.php?page=add-to-post3.2134.57

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Add To Post: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.14 ▼0.061.71 ▼0.3341.11 ▼1.81
Dashboard /wp-admin2,196 ▲165.56 ▼0.0993.06 ▲4.4143.76 ▲4.91
Posts /wp-admin/edit.php2,104 ▲42.16 ▲0.1540.15 ▲5.1536.59 ▼3.43
Add New Post /wp-admin/post-new.php1,529 ▲323.16 ▲0.28664.11 ▼19.6854.56 ▼13.57
Media Library /wp-admin/upload.php1,404 ▲14.20 ▲0.07106.79 ▲2.9448.70 ▲3.99
Add To Post /wp-admin/options-general.php?page=add-to-post8441.9930.6228.83

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > 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 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Add images for these screenshots: #1 (Plugin Activation), #2 (Plugin Settings Page), #3 (Example Usage)
You can take inspiration from this readme.txt

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

This is the main PHP file of "Add To Post" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
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
There were no executable files found in this plugin60 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2112060

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
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
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
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-1.png26.98KB11.56KB▼ 57.17%
screenshot-3.png23.46KB10.75KB▼ 54.17%