89% head-trimmer

Code Review | Head Trimmer

WordPress plugin Head Trimmer scored89%from 54 tests.

About plugin

  • Plugin page: head-trimmer
  • Plugin version: 1.0.4
  • PHP compatiblity: 5.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-6.3
  • WordPress version: 6.3.1
  • First release: May 26, 2022
  • Latest release: Aug 10, 2023
  • Number of updates: 17
  • Update frequency: every 25.9 days
  • Top authors: dalesandro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,213 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
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼8.08ms] Passed 4 tests

An overview of server-side resources used by Head Trimmer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.31 ▼9.17
Dashboard /wp-admin3.34 ▼0.0150.89 ▼13.23
Posts /wp-admin/edit.php3.45 ▲0.1048.77 ▼3.03
Add New Post /wp-admin/post-new.php5.92 ▲0.0387.42 ▼6.89
Media Library /wp-admin/upload.php3.26 ▲0.0339.09 ▲2.15
Head Trimmer /wp-admin/options-general.php?page=head-trimmer-settings3.2332.96

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

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

Browser metrics Passed 4 tests

Head Trimmer: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.23 ▼0.302.22 ▲0.6545.34 ▲5.65
Dashboard /wp-admin2,196 ▲195.67 ▲0.1184.52 ▼9.8542.00 ▲1.24
Posts /wp-admin/edit.php2,104 ▲42.04 ▲0.0435.07 ▼5.2333.95 ▼1.36
Add New Post /wp-admin/post-new.php1,530 ▲223.38 ▲0.32602.29 ▼92.7655.35 ▼1.29
Media Library /wp-admin/upload.php1,404 ▲74.33 ▲0.1197.36 ▼47.8941.75 ▼14.31
Head Trimmer /wp-admin/options-general.php?page=head-trimmer-settings9332.0021.7428.46

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: head, security, meta, remove, clean

head-trimmer/head-trimmer.php 85% from 13 tests

The entry point to "Head Trimmer" version 1.0.4 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 167 characters long)
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin597 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP411212597

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.47
Average class complexity60.00
▷ Minimum class complexity59.00
▷ Maximum class complexity61.00
Average method complexity3.68
▷ Minimum method complexity1.00
▷ Maximum method complexity48.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods44
▷ Static methods00.00%
▷ Public methods44100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin