84% clearscope

Code Review | Clearscope

WordPress plugin Clearscope scored84%from 54 tests.

About plugin

  • Plugin page: clearscope
  • Plugin version: 2.0.3
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0
  • WordPress version: 6.3.1
  • First release: Feb 4, 2020
  • Latest release: Feb 28, 2023
  • Number of updates: 41
  • Update frequency: every 27.3 days
  • Top authors: mushilabs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active /8,772 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by Clearscope
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.0144.91 ▼1.81
Dashboard /wp-admin3.58 ▲0.0251.31 ▼4.50
Posts /wp-admin/edit.php3.70 ▲0.0251.33 ▲0.81
Add New Post /wp-admin/post-new.php6.13 ▼0.0196.49 ▼6.15
Media Library /wp-admin/upload.php3.50 ▲0.0142.20 ▼0.85

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Clearscope
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.27 ▲0.071.77 ▼0.1144.98 ▲0.64
Dashboard /wp-admin2,198 ▲215.62 ▼0.0390.78 ▼1.3340.60 ▼8.92
Posts /wp-admin/edit.php2,143 ▲432.74 ▲0.7558.18 ▲20.7255.22 ▲19.03
Add New Post /wp-admin/post-new.php1,553 ▲823.91 ▲0.70710.91 ▲71.6038.73 ▼13.30
Media Library /wp-admin/upload.php1,397 ▼34.24 ▼0.02108.20 ▲4.6149.02 ▲7.17

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
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/clearscope/clearscope-plugin.php:9

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 96% from 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
3 plugin tags: content analysis, seo, readability

clearscope/clearscope-main.php 92% from 13 tests

"Clearscope" version 2.0.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("clearscope.php" instead of "clearscope-main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin97 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2112583
CSS12114

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods583.33%
▷ Protected methods00.00%
▷ Private methods116.67%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin