84% 1click-grey-mode

Code Review | = 1Click Grey Mode

WordPress plugin = 1Click Grey Mode scored84%from 54 tests.

About plugin

  • Plugin page: 1click-grey-mode
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Oct 27, 2019
  • Latest release: Oct 28, 2019
  • Number of updates: 8
  • Update frequency: every 0.1 days
  • Top authors: eng.hanan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /679 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
Installer ran successfully

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

A check of server-side resources used by = 1Click Grey Mode
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0144.93 ▲5.33
Dashboard /wp-admin3.36 ▼0.0250.78 ▼21.79
Posts /wp-admin/edit.php3.48 ▲0.0853.98 ▼0.96
Add New Post /wp-admin/post-new.php5.94 ▲0.0284.94 ▼8.83
Media Library /wp-admin/upload.php3.29 ▲0.0240.17 ▲6.58

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

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

Browser metrics Passed 4 tests

= 1Click Grey Mode: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲8614.21 ▼0.441.95 ▲0.1343.50 ▼0.02
Dashboard /wp-admin2,211 ▲345.57 ▲0.0389.51 ▲2.6038.26 ▼3.72
Posts /wp-admin/edit.php2,116 ▲161.95 ▲0.0138.23 ▼0.5436.38 ▲2.22
Add New Post /wp-admin/post-new.php1,539 ▲1323.23 ▼0.37681.56 ▼0.1357.08 ▲4.32
Media Library /wp-admin/upload.php1,419 ▲194.21 ▼0.0196.78 ▼5.3441.86 ▼8.71

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/1click-grey-mode/1click-grey-mode.php
    • > /wp-content/plugins/1click-grey-mode/includes/cgm-functions.php

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 errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Contributors: The plugin contributors field is missing
You can take inspiration from this readme.txt

1click-grey-mode/1click-grey-mode.php Passed 13 tests

The entry point to "= 1Click Grey Mode" version 1.0 is a PHP file that has certain tags in its header comment area
20 characters long description:
Plugin for Grey Mode

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin100 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2373992
CSS1108

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected