68% code-quality-control-tool

Code Review | Code Quality Control Tool

WordPress plugin Code Quality Control Tool scored68%from 54 tests.

About plugin

  • Plugin page: code-quality-cont...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.0.2
  • WordPress version: 6.3.1
  • First release: Apr 23, 2022
  • Latest release: Sep 21, 2022
  • Number of updates: 6
  • Update frequency: every 25.3 days
  • Top authors: nickclarkweb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /992 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.89MB] [CPU: ▼51.77ms] Passed 4 tests

A check of server-side resources used by Code Quality Control Tool
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.95 ▼0.08
Dashboard /wp-admin2.05 ▼1.255.19 ▼48.23
Posts /wp-admin/edit.php2.05 ▼1.314.72 ▼38.92
Add New Post /wp-admin/post-new.php2.05 ▼3.845.38 ▼89.25
Media Library /wp-admin/upload.php2.05 ▼1.185.25 ▼30.68
PHP Code Control /wp-admin/options-general.php?page=php-code-control-settings2.055.03

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

A short overview of filesystem and database impact
Just a few items left to fix
  • The plugin illegally modified 2 files (4.74KB) outside of "wp-content/plugins/code-quality-control-tool/" and "wp-content/uploads/"
    • (new file) wp-content/_php_code_control.ini
    • (modified) wp-config.php
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Code Quality Control Tool: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6913.28 ▼1.091.65 ▼0.1745.87 ▲1.30
Dashboard /wp-admin2,224 ▲365.90 ▲0.99100.49 ▼7.1540.14 ▼2.83
Posts /wp-admin/edit.php2,107 ▲182.02 ▲0.0035.59 ▼1.9131.18 ▼3.21
Add New Post /wp-admin/post-new.php1,536 ▲1722.67 ▼0.41632.93 ▼35.1355.81 ▼1.87
Media Library /wp-admin/upload.php1,403 ▲124.26 ▼0.0299.45 ▲2.2941.77 ▲0.78
PHP Code Control /wp-admin/options-general.php?page=php-code-control-settings1,2422.0623.0534.34

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin cannot be uninstalled
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the cqctphp_Load_CSS handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=php-code-control-settings
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the cqctphp_Load_CSS handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

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 take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/code-quality-control-tool/code-quality-control-tool.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: error handling, debug, tools, code analyzer, error log

code-quality-control-tool/code-quality-control-tool.php Passed 13 tests

The main PHP file in "Code Quality Control Tool" ver. 0.1 adds more information about the plugin and also serves as the entry point for this plugin
76 characters long description:
Trace all PHP error types. Creates logs file. Useful for PHP code analytics.

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
Success! There were no dangerous files found in this plugin743 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP219143720
CSS10019
HTML1004

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity32.00
▷ Minimum class complexity32.00
▷ Maximum class complexity32.00
Average method complexity3.38
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods13100.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
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
images/livechat.png14.97KB6.22KB▼ 58.43%