84% usher

Code Review | Usher

WordPress plugin Usher scored84%from 54 tests.

About plugin

  • Plugin page: usher
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8
  • WordPress version: 6.3.1
  • First release: Mar 24, 2019
  • Latest release: Jul 1, 2021
  • Number of updates: 14
  • Update frequency: every 59.3 days
  • Top authors: DrewAPicture (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /979 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.13MB] [CPU: ▼5.35ms] Passed 4 tests

This is a short check of server-side resources used by Usher
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0436.15 ▼5.11
Dashboard /wp-admin3.49 ▲0.1944.10 ▼4.74
Posts /wp-admin/edit.php3.54 ▲0.1949.86 ▼0.55
Add New Post /wp-admin/post-new.php6.03 ▲0.1591.11 ▼10.99
Media Library /wp-admin/upload.php3.35 ▲0.1336.83 ▲2.53

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Usher
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,919 ▲14814.08 ▼0.221.90 ▼0.2143.40 ▼1.12
Dashboard /wp-admin2,311 ▲1235.60 ▼0.30124.17 ▲5.8043.29 ▼0.62
Posts /wp-admin/edit.php2,202 ▲1132.53 ▲0.4858.85 ▲19.5033.70 ▲0.49
Add New Post /wp-admin/post-new.php1,591 ▲7023.87 ▲0.67614.82 ▼49.4536.66 ▼27.27
Media Library /wp-admin/upload.php1,493 ▲1054.97 ▲0.74107.76 ▲0.9441.36 ▼1.89

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
The following issues need your attention
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'Usher\\Util\\Registry' not found in wp-content/plugins/usher/includes/components/class-shortcut-registry.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'Usher\\Core\\Interfaces\\Loader' not found in wp-content/plugins/usher/includes/core/class-shortcuts.php:21
    • > PHP Fatal error
      Uncaught Error: Interface 'Usher\\Core\\Interfaces\\Loader' not found in wp-content/plugins/usher/includes/core/class-assets.php:20
    • > PHP Fatal error
      Uncaught Error: Interface 'Usher\\Core\\Interfaces\\Loader' not found in wp-content/plugins/usher/includes/core/class-render-dialog.php:20

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 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
4 plugin tags: shortcuts, navigation, admin, keyboard

usher/usher.php 92% from 13 tests

The principal PHP file in "Usher" v. 1.0.1 is loaded by WordPress automatically on each request
It is important to fix the following:
  • 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
Success! There were no dangerous files found in this plugin1,078 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP10181634561
JavaScript4135484493
Markdown17024

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity6.88
▷ Minimum class complexity1.00
▷ Maximum class complexity13.00
Average method complexity1.96
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces5
Interfaces1
Traits0
Classes7
▷ Abstract classes114.29%
▷ Concrete classes685.71%
▷ Final classes233.33%
Methods51
▷ Static methods35.88%
▷ Public methods3466.67%
▷ Protected methods00.00%
▷ Private methods1733.33%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants4
▷ Global constants4100.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
No PNG files were detected