68% haste-impress

Code Review | Haste Impress

WordPress plugin Haste Impress scored68%from 54 tests.

About plugin

  • Plugin page: haste-impress
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.3
  • WordPress version: 6.3.1
  • First release: Feb 19, 2016
  • Latest release: Feb 19, 2016
  • Number of updates: 3
  • Update frequency: every 98.0 days
  • Top authors: AllysonSouza (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,558 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.20MB] [CPU: ▼3.07ms] Passed 4 tests

Server-side resources used by Haste Impress
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.2236.75 ▼0.50
Dashboard /wp-admin3.51 ▲0.1745.52 ▼13.78
Posts /wp-admin/edit.php3.63 ▲0.2749.34 ▲2.71
Add New Post /wp-admin/post-new.php6.10 ▲0.2184.98 ▼0.72
Media Library /wp-admin/upload.php3.43 ▲0.2137.73 ▲6.33
All Steps /wp-admin/edit.php?post_type=steps3.4838.15
Presentations /wp-admin/edit-tags.php?taxonomy=presentations&post_type=steps3.4334.17
Add New /wp-admin/post-new.php?post_type=steps3.5949.74

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 179 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Haste Impress
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲8813.35 ▼1.031.64 ▲0.0440.56 ▲0.37
Dashboard /wp-admin2,240 ▲485.86 ▲0.8195.59 ▼13.7637.25 ▼2.17
Posts /wp-admin/edit.php2,123 ▲342.04 ▼0.0040.52 ▲4.0834.99 ▼3.16
Add New Post /wp-admin/post-new.php1,559 ▲4023.42 ▲0.06602.68 ▼67.7760.68 ▲8.81
Media Library /wp-admin/upload.php1,422 ▲374.23 ▼0.0398.22 ▼3.0442.93 ▼3.00
All Steps /wp-admin/edit.php?post_type=steps1,1092.0233.7829.07
Presentations /wp-admin/edit-tags.php?taxonomy=presentations&post_type=steps1,2622.1427.3228.99
Add New /wp-admin/post-new.php?post_type=steps2,6917.97175.1370.54

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, class 'HasteImpress' not found
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% from 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
Please fix the following items
  • 31× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Trying to get property 'post_name' of non-object in wp-content/plugins/haste-impress/templates/slide-parameters.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/haste-impress/templates/content-video.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function language_attributes() in wp-content/plugins/haste-impress/templates/header-impress.php:3
    • > PHP Notice
      Undefined variable: step_format in wp-content/plugins/haste-impress/templates/slide-parameters.php on line 1
    • > PHP Notice
      Undefined variable: step_format in wp-content/plugins/haste-impress/templates/slide-parameters.php on line 1
    • > PHP Notice
      Undefined variable: step_format in wp-content/plugins/haste-impress/templates/slide-parameters.php on line 1
    • > PHP Notice
      Trying to get property 'post_name' of non-object in wp-content/plugins/haste-impress/templates/slide-parameters.php on line 1
    • > PHP Notice
      Trying to get property 'post_name' of non-object in wp-content/plugins/haste-impress/templates/slide-parameters.php on line 1
    • > PHP Notice
      Trying to get property 'post_name' of non-object in wp-content/plugins/haste-impress/templates/slide-parameters.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_footer() in wp-content/plugins/haste-impress/templates/footer-impress.php:1

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
    • > GET request to /wp-admin/post-new.php?post_type=steps
    • > Network (severe)
    wp-content/themes/twentytwentyone/core/assets/css/admin.css - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/post-new.php?post_type=steps
    • > Network (severe)
    wp-content/themes/twentytwentyone/core/assets/js/admin.js - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: presentations, presentment, impress

haste-impress/haste-impress.php 92% from 13 tests

"Haste Impress" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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 plugin42,517 lines of code in 69 files:
LanguageFilesBlank linesComment linesLines of code
SVG260036,507
CSS83542022,867
JavaScript197204882,009
PHP152252571,027
PO File14145107

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity39.00
▷ Minimum class complexity24.00
▷ Maximum class complexity54.00
Average method complexity3.24
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods34
▷ Static methods25.88%
▷ Public methods2161.76%
▷ Protected methods1338.24%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/apple-touch-icon.png3.86KB2.54KB▼ 34.25%
core/assets/images/placeholder.png0.22KB0.12KB▼ 43.89%
assets/images/favicon.png1.30KB1.27KB▼ 2.63%