78% wp-intro-js-tours

Code Review | WP Intro.JS Plugin

WordPress plugin WP Intro.JS Plugin scored78%from 54 tests.

About plugin

  • Plugin page: wp-intro-js-tours
  • Plugin version: 1.1
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.8
  • WordPress version: 6.3.1
  • First release: Jun 15, 2020
  • Latest release: Jul 10, 2021
  • Number of updates: 20
  • Update frequency: every 19.5 days
  • Top authors: cfuze (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active /1,059 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼4.13ms] Passed 4 tests

Server-side resources used by WP Intro.JS Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0639.86 ▲1.24
Dashboard /wp-admin3.38 ▲0.0348.32 ▼10.33
Posts /wp-admin/edit.php3.41 ▲0.0549.78 ▲6.04
Add New Post /wp-admin/post-new.php5.96 ▲0.0778.61 ▼5.25
Media Library /wp-admin/upload.php3.30 ▲0.0732.57 ▼2.16

Server storage [IO: ▲0.21MB] [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: 15 new files
Database: 1 new table, 8 new options
New tables
wp_wpintrojs_tours
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
wpintrojs_page_register
wpintrojs_db_version
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Intro.JS Plugin
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,946 ▲20013.98 ▼0.3810.40 ▲8.8041.77 ▲2.85
Dashboard /wp-admin2,224 ▲445.59 ▲0.0295.83 ▲8.3642.12 ▲1.89
Posts /wp-admin/edit.php2,136 ▲362.28 ▲0.2638.94 ▲2.6035.70 ▼1.05
Add New Post /wp-admin/post-new.php1,556 ▲3023.30 ▼0.07663.62 ▼9.7737.46 ▼22.41
Media Library /wp-admin/upload.php1,429 ▲294.37 ▲0.2895.34 ▼16.4739.26 ▼10.61

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-intro-js-tours/wpintrojs.php
  • 10× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_row() on null in wp-content/plugins/wp-intro-js-tours/components/code_generator.php:14
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-intro-js-tours/components/hints.php on line 3
    • > 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/wp-intro-js-tours/components/tours_class.php on line 3
    • > 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/wp-intro-js-tours/components/tours_class.php on line 3
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-intro-js-tours/components/tours_class.php on line 3
    • > 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/wp-intro-js-tours/components/hints.php on line 3
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-intro-js-tours/components/steps.php on line 3
    • > 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/wp-intro-js-tours/components/steps.php on line 3
    • > 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/wp-intro-js-tours/components/hints.php on line 3
    • > 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/wp-intro-js-tours/components/steps.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
9 plugin tags: hint, welcome, cfuze, step, help...

wp-intro-js-tours/wpintrojs.php 77% from 13 tests

"WP Intro.JS Plugin" version 1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-intro-js-tours.php" instead of "wpintrojs.php")
  • Description: The description should be shorter than 140 characters (currently 142 characters long)
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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 plugin2,145 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
CSS342481,229
PHP58033897
JavaScript20119

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions19
▷ Named functions19100.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
4 PNG files occupy 0.09MB with 0.04MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.PNG16.03KB7.98KB▼ 50.25%
assets/screenshot-4.PNG17.92KB9.71KB▼ 45.77%
assets/screenshot-1.PNG35.92KB18.55KB▼ 48.36%
assets/screenshot-3.PNG18.37KB9.78KB▼ 46.76%