74% greymode

Code Review | Grey Mode

WordPress plugin Grey Mode scored74%from 54 tests.

About plugin

  • Plugin page: greymode
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-4.6.1
  • WordPress version: 6.3.1
  • First release: Oct 22, 2016
  • Latest release: Oct 29, 2016
  • Number of updates: 9
  • Update frequency: every 0.8 days
  • Top authors: hirokrap (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /881 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼6.56ms] Passed 4 tests

A check of server-side resources used by Grey Mode
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.42 ▼0.0428.16 ▼14.65
Dashboard /wp-admin3.37 ▲0.0651.97 ▼1.53
Posts /wp-admin/edit.php3.48 ▲0.1247.32 ▲1.04
Add New Post /wp-admin/post-new.php5.95 ▲0.0683.42 ▼8.51
Media Library /wp-admin/upload.php3.29 ▲0.0636.20 ▼1.55

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Grey Mode
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,955 ▲22013.92 ▼0.769.79 ▲8.0739.77 ▼0.56
Dashboard /wp-admin2,225 ▲375.90 ▲1.01100.17 ▼10.8937.73 ▼4.64
Posts /wp-admin/edit.php2,105 ▲162.00 ▲0.0235.78 ▲2.2134.43 ▲3.02
Add New Post /wp-admin/post-new.php1,527 ▲1317.40 ▼0.14683.88 ▼21.1456.30 ▼11.51
Media Library /wp-admin/upload.php1,404 ▲134.20 ▼0.0794.62 ▼7.7940.70 ▼4.95

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin has failed uninstalling correctly, leaving 10 files (0.02MB) in the plugin directory
    • (new file) public/greymode-public.js
    • (new file) readme.txt
    • (new file) public/external/mourn.js/css/mourn.css
    • (new file) private/greymode-admin.php
    • (new file) greymode.php
    • (new file) public/external/mourn.js/js/mourn.js
    • (new file) configurations/environment.php
    • (new file) uninstall.php
    • (new file) private/greymode-admin.js
    • (new file) public/greymode-public.php
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • 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
Everything seems fine, however 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
Please fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Hiro_Greymode_Settings' not found in wp-content/plugins/greymode/private/greymode-admin.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Hiro_Greymode_Settings' not found in wp-content/plugins/greymode/public/greymode-public.php:2

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% 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
Attributes that require attention:
  • Donate link: Please fix this invalid URI: ""
You can look at the official readme.txt

greymode/greymode.php Passed 13 tests

The principal PHP file in "Grey Mode" v. 2.0.0 is loaded by WordPress automatically on each request
137 characters long description:
Plugin that change your website to grey scale, If user would like to change to normal color? easy! we provide toggle button to switch it!

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 plugin391 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP52810250
JavaScript395140
CSS1001

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.24
Average class complexity4.00
▷ Minimum class complexity1.00
▷ Maximum class complexity10.00
Average method complexity1.56
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes133.33%
▷ Concrete classes266.67%
▷ Final classes00.00%
Methods16
▷ Static methods16100.00%
▷ Public methods1168.75%
▷ Protected methods00.00%
▷ Private methods531.25%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants00.00%
▷ Class constants6100.00%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected