83% clearboth

Code Review | ClearBoth

WordPress plugin ClearBoth scored83%from 54 tests.

About plugin

  • Plugin page: clearboth
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-6.0.2
  • WordPress version: 6.3.1
  • First release: Mar 11, 2016
  • Latest release: Sep 15, 2022
  • Number of updates: 21
  • Update frequency: every 113.3 days
  • Top authors: nabtron (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /3,879 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

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

Analyzing server-side resources used by ClearBoth
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0037.01 ▼2.34
Dashboard /wp-admin3.31 ▼0.0448.70 ▼11.42
Posts /wp-admin/edit.php3.36 ▲0.0048.69 ▼0.49
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.96 ▼6.32
Media Library /wp-admin/upload.php3.23 ▲0.0038.32 ▲3.49

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by ClearBoth
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.26 ▼1.391.82 ▼0.0039.32 ▲0.18
Dashboard /wp-admin2,209 ▲215.91 ▲1.03109.88 ▼0.1739.28 ▼6.43
Posts /wp-admin/edit.php2,092 ▲31.99 ▼0.0041.53 ▼0.3637.85 ▲2.08
Add New Post /wp-admin/post-new.php1,519 ▼921.30 ▲2.90685.11 ▲38.5363.77 ▲9.37
Media Library /wp-admin/upload.php1,385 ▼64.25 ▲0.10111.03 ▲3.4047.01 ▲1.54

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 did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/clearboth/clearboth.php:20

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 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === clearboth === )
You can take inspiration from this readme.txt

clearboth/clearboth.php 92% from 13 tests

The main PHP script in "ClearBoth" version 1.0.4 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 146 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin9 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11109

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods1
▷ Static methods1100.00%
▷ Public methods1100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected