72% hasten-companion

Code Review | Hasten Companion

WordPress plugin Hasten Companion scored 72% from 54 tests.

About plugin

  • Plugin page: hasten-companion
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0+
  • WordPress version: 5.9.2
  • First release: May 1, 2018
  • Latest release: May 8, 2018
  • Number of updates: 8
  • Update frequency: every 0.9 days
  • Top authors: axelthemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active / 1,511 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.07MB] [CPU: ▼294.15ms] Passed 4 tests

Analyzing server-side resources used by Hasten Companion
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.1653.65 ▲3.83
Dashboard /wp-admin3.51 ▲0.0935.24 ▲1.14
Posts /wp-admin/edit.php3.73 ▲0.0937.74 ▲1.16
Add New Post /wp-admin/post-new.php6.98 ▲0.0093.59 ▼1,180.46
Media Library /wp-admin/upload.php3.38 ▲0.0825.86 ▲1.56
Customize /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php5.0851.29

Server storage [IO: ▲0.08MB] [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: 30 new files
Database: no new tables, 2 new options
New WordPress options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Hasten Companion
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,926 ▲17216.56 ▲0.929.29 ▲3.332.88 ▲0.39
Dashboard /wp-admin2,898 ▲376.17 ▼0.01117.47 ▼22.46155.97 ▼11.24
Posts /wp-admin/edit.php2,709 ▲213.24 ▲0.0064.99 ▲1.14138.81 ▼3.55
Add New Post /wp-admin/post-new.php1,766 ▲10521.92 ▲5.71485.87 ▲57.71157.94 ▼4.57
Media Library /wp-admin/upload.php1,722 ▲245.56 ▲0.02147.85 ▲7.33190.36 ▲2.15
Customize /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php7,17822.83573.42215.33

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 2 options in the database
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Notice in wp-includes/class-wp-customize-nav-menus.php+1152
    Trying to get property 'title' of non-object

SRP 0% 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
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/hasten-companion/admin/partials/hasten-companion-admin-display.php
    • > /wp-content/plugins/hasten-companion/public/partials/hasten-companion-public-display.php
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hasten-companion/includes/hasten-companion-metaboxes.php:13
    • > PHP Fatal error
      Uncaught Error: Call to a member function add_setting() on null in wp-content/plugins/hasten-companion/includes/customizer/additional-customizer.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hasten-companion/includes/customizer/theme-options.php:236
    • > PHP Fatal error
      Uncaught Error: Call to a member function add_setting() on null in wp-content/plugins/hasten-companion/includes/customizer/cta-options.php:2
    • > PHP Notice
      Undefined variable: wp_customize in wp-content/plugins/hasten-companion/includes/customizer/additional-customizer.php on line 2
    • > PHP Notice
      Undefined variable: wp_customize in wp-content/plugins/hasten-companion/includes/customizer/cta-options.php on line 2

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Please add images for these screenshots: #1 (This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is taken from), #2 (This is the second screen shot)
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === hasten-companion === )
  • Donate link: Invalid URI ("")
You can look at the official readme.txt

hasten-companion/hasten-companion.php Passed 13 tests

The main file in "Hasten Companion" v. 1.1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
96 characters long description:
This is a short description of what the plugin does. It's displayed in the WordPress admin area.

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
There were no executable files found in this plugin1,014 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP19208579951
JavaScript2105433
CSS32830

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity2.89
▷ Minimum class complexity1.00
▷ Maximum class complexity10.00
Average method complexity1.63
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods27
▷ Static methods27.41%
▷ Public methods2281.48%
▷ Protected methods00.00%
▷ Private methods518.52%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin