64% instruct

Code Review | Instruct

WordPress plugin Instruct scored64%from 54 tests.

About plugin

  • Plugin page: instruct
  • Plugin version: 0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.8
  • WordPress version: 6.3.1
  • First release: Jan 25, 2013
  • Latest release: Feb 7, 2014
  • Number of updates: 17
  • Update frequency: every 22.3 days
  • Top authors: barteled (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10+ active /2,868 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼0.86MB] [CPU: ▼38.82ms] Passed 4 tests

Server-side resources used by Instruct
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1142.71 ▼4.81
Dashboard /wp-admin3.10 ▼0.2525.21 ▼41.88
Posts /wp-admin/edit.php3.10 ▼0.2624.75 ▼28.88
Add New Post /wp-admin/post-new.php3.10 ▼2.7922.80 ▼69.75
Media Library /wp-admin/upload.php3.10 ▼0.1321.14 ▼14.77

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 9 new files
Database: 3 new tables, 7 new options
New tables
wp_instruct_step
wp_instruct_progress
wp_instruct
New WordPress options
theysaidso_admin_options
diy_db_version
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Instruct
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,914 ▲15313.66 ▼0.516.00 ▲4.0844.09 ▲0.45
Dashboard /wp-admin2,234 ▲315.81 ▼0.08102.51 ▼7.5837.61 ▼2.81
Posts /wp-admin/edit.php2,095 ▼82.02 ▼0.0138.44 ▼2.0038.45 ▲1.81
Add New Post /wp-admin/post-new.php6,255 ▲4,71025.80 ▲2.61861.22 ▲233.5560.85 ▼12.27
Media Library /wp-admin/upload.php1,416 ▲194.24 ▲0.0299.21 ▼16.5046.62 ▼5.74

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-content/plugins/instruct/admin-menu.php+7
    Use of undefined constant diy_menu_main - assumed 'diy_menu_main' (this will throw an Error in a future version of PHP)
  • This plugin does not fully uninstall, leaving 3 tables in the database
    • wp_instruct
    • wp_instruct_progress
    • wp_instruct_step
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • diy_db_version
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 9× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/instruct/admin-menu.php:4
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/instruct/admin-table.php on line 2
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/instruct/instruct.php on line 21
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/instruct/admin-table.php on line 2
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/instruct/admin-table.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/instruct/admin-menu.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/instruct/shortcode.php:87
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/instruct/instruct.php on line 20
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/instruct/instruct.php on line 19

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
9 plugin tags: guide, manual, directions, instruction, instructables...

instruct/instruct.php Passed 13 tests

This is the main PHP file of "Instruct" version 0.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
83 characters long description:
Easily produce step-by-step instructions with images to include in pages and posts.

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
Good job! No executable or dangerous file extensions detected707 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP5146153623
CSS2151347
JavaScript1121337

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity5.00
▷ Minimum class complexity4.00
▷ Maximum class complexity6.00
Average method complexity1.57
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected