84% wp-tutorial-maker

Code Review | wp-tutorial-maker

WordPress plugin wp-tutorial-maker scored84%from 54 tests.

About plugin

  • Plugin page: wp-tutorial-maker
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-4.3
  • WordPress version: 6.3.1
  • First release: Jun 29, 2014
  • Latest release: Sep 14, 2015
  • Number of updates: 11
  • Update frequency: every 40.2 days
  • Top authors: barzik (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,234 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

Server-side resources used by wp-tutorial-maker
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0544.43 ▲2.96
Dashboard /wp-admin3.39 ▲0.0848.44 ▼4.61
Posts /wp-admin/edit.php3.50 ▲0.1446.13 ▼3.42
Add New Post /wp-admin/post-new.php5.97 ▲0.08100.00 ▼9.30
Media Library /wp-admin/upload.php3.31 ▲0.0836.76 ▼0.65

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 29 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for wp-tutorial-maker
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲5614.26 ▲0.021.78 ▲0.0644.19 ▲2.27
Dashboard /wp-admin2,218 ▲155.84 ▲0.8796.64 ▼11.2839.59 ▼5.66
Posts /wp-admin/edit.php2,097 ▼61.99 ▼0.0533.79 ▼10.3334.73 ▼1.55
Add New Post /wp-admin/post-new.php1,526 ▼317.68 ▲0.07610.72 ▼7.5750.39 ▲1.42
Media Library /wp-admin/upload.php1,403 ▲34.27 ▲0.05104.61 ▲4.7641.98 ▼2.12

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      require_once(/tmp/wordpress-tests-lib/includes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/wp-tutorial-maker/tests/bootstrap.php on line 17
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/wp-tutorial-maker/tests/test_wp_tutorial_maker_tests.php:8
    • > PHP Fatal error
      require_once(): Failed opening required '/tmp/wordpress-tests-lib/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-tutorial-maker/tests/bootstrap.php on line 17
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/wp-tutorial-maker/tests/test_wp_tutorial_maker_admin_tests.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: admin, links to posts, sorting, posts reference, tutorial...

wp-tutorial-maker/wp-tutorial-maker.php Passed 13 tests

The entry point to "wp-tutorial-maker" version 1.5 is a PHP file that has certain tags in its header comment area
58 characters long description:
Plugin to convert categories to Tutorial based categories.

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 detected859 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP10226369569
Bourne Shell12818120
Markdown123055
PO File1174254
CSS20226
XML12020
JavaScript14315

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity9.20
▷ Minimum class complexity1.00
▷ Maximum class complexity25.00
Average method complexity2.05
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods39
▷ Static methods615.38%
▷ Public methods3487.18%
▷ Protected methods00.00%
▷ Private methods512.82%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants685.71%
▷ Class constants114.29%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin