90% staunch

Code Review | Staunch

WordPress plugin Staunch scored 90% from 54 tests.

About plugin

  • Plugin page: staunch
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-3.5.1
  • WordPress version: 6.3.1
  • First release: Mar 19, 2013
  • Latest release: Mar 19, 2013
  • Number of updates: 3
  • Update frequency: every 1.0 days
  • Top authors: l3rady (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 739 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.52ms] Passed 4 tests

This is a short check of server-side resources used by Staunch
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▼0.0034.98 ▼6.22
Dashboard /wp-admin3.31 ▲0.0044.89 ▼5.51
Posts /wp-admin/edit.php3.36 ▲0.0047.79 ▼0.69
Add New Post /wp-admin/post-new.php5.89 ▲0.0095.51 ▼1.67
Media Library /wp-admin/upload.php3.23 ▲0.0033.17 ▲2.94

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Staunch
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,759 ▲2414.41 ▲0.202.10 ▲0.3240.41 ▼4.15
Dashboard /wp-admin2,154 ▼315.81 ▼0.05101.90 ▼4.1138.97 ▼5.46
Posts /wp-admin/edit.php2,049 ▼402.00 ▼0.0138.42 ▼3.4333.53 ▼2.16
Add New Post /wp-admin/post-new.php1,510 ▼3218.31 ▲0.07577.70 ▼39.2161.25 ▲2.57
Media Library /wp-admin/upload.php1,339 ▼494.22 ▲0.0093.99 ▼1.4942.05 ▼1.22

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

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

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 | 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
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
8 plugin tags: updates, plugin, version, themes, core...

staunch/staunch.php Passed 13 tests

The main PHP script in "Staunch" version 2.0 is automatically included on every request by WordPress
80 characters long description:
Remove update roles from admin users so updates cannot be done on a live system.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin32 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1101132

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.70
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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