84% matriphe-spamcolor

Code Review | matriphe colorspam

WordPress plugin matriphe colorspam scored84%from 54 tests.

About plugin

  • Plugin page: matriphe-spamcolor
  • Plugin version: 3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7.0-3.8.1
  • WordPress version: 6.3.1
  • First release: Jan 29, 2014
  • Latest release: Feb 2, 2014
  • Number of updates: 9
  • Update frequency: every 0.4 days
  • Top authors: muhammad.zamroni (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /768 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

Analyzing server-side resources used by matriphe colorspam
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.03 ▼3.56
Dashboard /wp-admin3.32 ▲0.0144.91 ▼5.72
Posts /wp-admin/edit.php3.37 ▲0.0144.74 ▼0.51
Add New Post /wp-admin/post-new.php5.90 ▲0.0191.43 ▲3.53
Media Library /wp-admin/upload.php3.24 ▲0.0136.50 ▲1.68

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 8 new options
New WordPress options
matriphe_colorspam_colors
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
matriphe_colorspam_version

Browser metrics Passed 4 tests

A check of browser resources used by matriphe colorspam
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.18 ▼1.201.83 ▼0.0447.11 ▲3.01
Dashboard /wp-admin2,206 ▲184.86 ▼0.93108.47 ▼5.6743.21 ▼3.16
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0339.92 ▲1.5336.57 ▼2.37
Add New Post /wp-admin/post-new.php1,533 ▲1923.16 ▲5.55608.72 ▼30.3557.79 ▲2.27
Media Library /wp-admin/upload.php1,391 ▲34.23 ▲0.0195.93 ▼10.1442.90 ▲0.55

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • widget_theysaidso_widget
    • matriphe_colorspam_colors
    • matriphe_colorspam_version
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/matriphe-spamcolor/matriphe-colorspam.php:12

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === matriphe-spamcolor === )
The official readme.txt might help

matriphe-spamcolor/matriphe-colorspam.php 92% from 13 tests

"matriphe colorspam" version 3.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("matriphe-spamcolor.php" instead of "matriphe-colorspam.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected150 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12610150

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
There are no PNG files in this plugin