90% trimpress

Code Review | TrimPress

WordPress plugin TrimPress scored90%from 54 tests.

About plugin

  • Plugin page: trimpress
  • Plugin version: 1.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Aug 15, 2020
  • Latest release: Aug 13, 2023
  • Number of updates: 10
  • Update frequency: every 109.4 days
  • Top authors: davidmatthew (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /4,425 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼4.56ms] Passed 4 tests

A check of server-side resources used by TrimPress
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0942.32 ▲4.17
Dashboard /wp-admin3.41 ▲0.1148.42 ▼2.33
Posts /wp-admin/edit.php3.53 ▲0.1747.80 ▼0.51
Add New Post /wp-admin/post-new.php5.99 ▲0.1184.18 ▼16.56
Media Library /wp-admin/upload.php3.33 ▲0.1137.03 ▲1.16
TrimPress /wp-admin/options-general.php?page=trimpress3.3030.91

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by TrimPress
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.22 ▼0.221.76 ▲0.2053.59 ▲14.48
Dashboard /wp-admin2,199 ▲225.63 ▲0.0185.63 ▲4.1738.43 ▼5.88
Posts /wp-admin/edit.php2,104 ▲251.98 ▼0.0132.95 ▼1.8633.44 ▲0.82
Add New Post /wp-admin/post-new.php1,531 ▲523.12 ▼0.28668.45 ▼13.5651.22 ▼4.88
Media Library /wp-admin/upload.php1,404 ▲44.27 ▲0.1393.69 ▼10.2441.88 ▼3.51
TrimPress /wp-admin/options-general.php?page=trimpress1,0852.0222.3028.77

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means 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
Congratulations! This plugin passed the SRP test

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: oembed, xml-rpc, cart fragments, heartbeat, emojis

trimpress/trimpress.php Passed 13 tests

The primary PHP file in "TrimPress" version 1.1 is used by WordPress to initiate all plugin functionality
71 characters long description:
Trim some of the cruft from WordPress for a lighter, more secure theme!

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin461 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP5172171445
Markdown16016

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity10.75
▷ Minimum class complexity2.00
▷ Maximum class complexity37.00
Average method complexity2.34
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods29
▷ Static methods00.00%
▷ Public methods29100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
There are no PNG files in this plugin