10% update-message

Code Review | Update Message

WordPress plugin Update Message scored10%from 54 tests.

About plugin

  • Plugin page: update-message
  • Plugin version: %s by %s', 'SL_frame...
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.5
  • WordPress version: 6.3.1
  • First release: Jul 9, 2011
  • Latest release: Apr 20, 2016
  • Number of updates: 72
  • Update frequency: every 24.3 days
  • Top authors: sedLex (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

30+ active /6,873 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/update-message/core.class.php+1698
    Methods with the same name as their class will not be constructors in a future version of PHP; coreSLframework has a deprecated constructor

Server metrics [RAM: ▼1.31MB] [CPU: ▼54.02ms] Passed 4 tests

Analyzing server-side resources used by Update Message
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.68 ▼0.786.45 ▼36.04
Dashboard /wp-admin2.70 ▼0.647.23 ▼50.67
Posts /wp-admin/edit.php2.70 ▼0.657.58 ▼39.78
Add New Post /wp-admin/post-new.php2.70 ▼3.188.44 ▼89.59
Media Library /wp-admin/upload.php2.70 ▼0.529.90 ▼24.70

Server storage [IO: ▲1.66MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
Please fix the following
  • The plugin illegally modified 3 files (1.18KB) outside of "wp-content/plugins/update-message/" and "wp-content/uploads/"
    • (new file) wp-content/sedlex/inline_styles/275f90e925fa2394057215c9f9014de3732e662c.css
    • (new file) wp-content/sedlex/inline_styles/9a18e8a74d07f708ac744d6a084df57862d0ab5e.css
    • (new file) wp-content/sedlex/inline_scripts/.empty
Filesystem: 183 new files
Database: no new tables, 9 new options
New WordPress options
widget_theysaidso_widget
updatemessage_options
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_recent-comments
plugin_error_on_activation
coreSLframework_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Update Message
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲7214.25 ▼0.111.65 ▲0.0039.47 ▼4.58
Dashboard /wp-admin2,225 ▲455.66 ▲0.1290.11 ▼4.4342.11 ▲2.13
Posts /wp-admin/edit.php2,127 ▲272.01 ▲0.0839.76 ▼0.1036.32 ▲2.77
Add New Post /wp-admin/post-new.php6,273 ▲4,74726.19 ▲3.34917.71 ▲271.2761.41 ▲11.30
Media Library /wp-admin/upload.php1,430 ▲274.17 ▼0.0395.59 ▼4.0542.05 ▼0.50
About... /wp-admin/sedlex.php260.410.1014.32
Update Message /wp-admin/sedlex.php?page=update-message/update-message.php260.410.095.60

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/update-message/core.class.php+1698
    Methods with the same name as their class will not be constructors in a future version of PHP; coreSLframework has a deprecated constructor
  • Zombie WordPress options detected upon uninstall: 8 options
    • widget_recent-posts
    • db_upgraded
    • plugin_error_on_activation
    • coreSLframework_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
The following issues need your attention
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/update-message/core.class.php
    • > /wp-content/plugins/update-message/update-message.php
    • > /wp-content/plugins/update-message/core.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      require_once(core.php): failed to open stream: No such file or directory in wp-content/plugins/update-message/core/templates/my-plugin.php on line 18
    • > PHP Fatal error
      require_once(): Failed opening required 'core.php' (include_path='.:/usr/share/php') in wp-content/plugins/update-message/core/templates/my-plugin.php on line 18

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following browser errors
    • > GET request to /wp-admin/sedlex.php
    • > Network (severe)
    wp-admin/sedlex.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/sedlex.php?page=update-message/update-message.php
    • > Network (severe)
    wp-admin/sedlex.php?page=update-message/update-message.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (The configuration page of the plugin), #2 (An example of an update box), #3 (Configuration of the update box in a post)
You can look at the official readme.txt

update-message/core.class.php 85% from 13 tests

This is the main PHP file of "Update Message" version %s by %s', 'SL_frame..., providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("update-message.php" instead of "core.class.php")
  • Version: The version number should only use digits and periods (ex. "1.0.3" instead of "%s by %s', 'SL_frame...")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected17,310 lines of code in 81 files:
LanguageFilesBlank linesComment linesLines of code
PO File424,11209,112
PHP199241,6826,801
JavaScript6217253823
CSS108513459
Markdown120084
JSON10029
INI2002

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
These items need your attention
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 119)
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity50.16
▷ Minimum class complexity1.00
▷ Maximum class complexity211.00
Average method complexity7.23
▷ Minimum method complexity1.00
▷ Maximum method complexity119.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes19
▷ Abstract classes15.26%
▷ Concrete classes1894.74%
▷ Final classes00.00%
Methods150
▷ Static methods3523.33%
▷ Public methods14798.00%
▷ Protected methods32.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
37 PNG files occupy 0.43MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
core/img/valid.png4.34KB1.51KB▼ 65.32%
core/img/tree_lastnode_plus.png0.14KB0.12KB▼ 14.97%
core/img/tab_list.png0.52KB0.43KB▼ 17.07%
core/img/tab_param.png0.50KB0.46KB▼ 6.31%
core/img/tab_plug.png0.71KB0.52KB▼ 27.30%