84% random-messages

Code Review | Random Messages

WordPress plugin Random Messages scored84%from 54 tests.

About plugin

  • Plugin page: random-messages
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-3.6
  • WordPress version: 6.3.1
  • First release: Aug 6, 2013
  • Latest release: Aug 11, 2013
  • Number of updates: 11
  • Update frequency: every 0.5 days
  • Top authors: shoshirasaka (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,293 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.00MB] [CPU: ▼6.63ms] Passed 4 tests

A check of server-side resources used by Random Messages
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.77 ▼4.72
Dashboard /wp-admin3.31 ▲0.0148.24 ▼3.17
Posts /wp-admin/edit.php3.36 ▲0.0050.54 ▼0.85
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.85 ▼17.79
Media Library /wp-admin/upload.php3.23 ▲0.0037.16 ▲1.31

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Random Messages
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.38 ▲0.031.70 ▲0.1641.46 ▲1.11
Dashboard /wp-admin2,205 ▲255.55 ▼0.1185.78 ▼5.1740.99 ▼3.68
Posts /wp-admin/edit.php2,119 ▲192.02 ▲0.0135.30 ▼9.9434.48 ▼1.27
Add New Post /wp-admin/post-new.php1,543 ▲1723.18 ▲0.06679.13 ▲40.4959.65 ▲1.81
Media Library /wp-admin/upload.php1,416 ▲164.21 ▲0.0097.05 ▼3.3943.32 ▼3.22

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/random-messages/random-messages.php:13

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Add an image for screenshot #1 (The admin page)
You can take inspiration from this readme.txt

random-messages/random-messages.php Passed 13 tests

The entry point to "Random Messages" version 1.3 is a PHP file that has certain tags in its header comment area
35 characters long description:
Show random messages where you like

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin79 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PO File191540
PHP1101039

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.12
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%
Functions3
▷ Named functions3100.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
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png10.64KB4.75KB▼ 55.32%