90% single-post-message

Code Review | Single Post Message

WordPress plugin Single Post Message scored90%from 54 tests.

About plugin

  • Plugin page: single-post-message
  • Plugin version: 2.4.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.1-4.2.1
  • WordPress version: 6.3.1
  • First release: Jul 31, 2012
  • Latest release: Jan 7, 2017
  • Number of updates: 27
  • Update frequency: every 60.5 days
  • Top authors: tommcfarlin (92.59%)philiparthurmoore (11.11%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /4,024 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
This plugin's installer ran successfully

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

Server-side resources used by Single Post Message
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.68 ▼0.61
Dashboard /wp-admin3.31 ▲0.0149.74 ▼3.96
Posts /wp-admin/edit.php3.37 ▲0.0149.00 ▼2.87
Add New Post /wp-admin/post-new.php5.92 ▲0.0387.07 ▼2.66
Media Library /wp-admin/upload.php3.24 ▲0.0132.90 ▼3.31

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Single Post Message
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.40 ▼0.971.65 ▼0.0842.77 ▲2.13
Dashboard /wp-admin2,213 ▲255.88 ▼0.03103.22 ▼5.5640.59 ▼1.11
Posts /wp-admin/edit.php2,093 ▲12.02 ▲0.0235.48 ▼4.9535.87 ▼0.82
Add New Post /wp-admin/post-new.php6,236 ▲4,71726.00 ▲2.74876.09 ▲198.3362.60 ▲13.61
Media Library /wp-admin/upload.php1,389 ▼24.21 ▼0.01101.89 ▼3.2043.88 ▼0.16

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Please add images for these screenshots: #1 (The Single Post Message editor and preview located below the content editor on the 'Add New Post' and 'Edit Post' screen), #2 (The Single Post Message rendered between the title and the post content)
The official readme.txt is a good inspiration

single-post-message/single-post-message.php Passed 13 tests

This is the main PHP file of "Single Post Message" version 2.4.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
98 characters long description:
Easily add short messages and announcements above posts. Displays in the RSS feed and on the blog.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected225 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP25310799
PO File3181886
LESS13023
JavaScript29515
CSS1002

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods111.11%
▷ Public methods888.89%
▷ Protected methods00.00%
▷ Private methods111.11%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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.10MB with 0.07MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png77.57KB23.52KB▼ 69.69%
screenshot-1.png28.04KB8.45KB▼ 69.87%