84% wpdevhub-troubleshooting-guides

Code Review | WPDevHub Troubleshooting Guides

WordPress plugin WPDevHub Troubleshooting Guides scored84%from 54 tests.

About plugin

  • Plugin page: wpdevhub-troubles...
  • Plugin version: 2.9.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.3
  • WordPress version: 6.3.1
  • First release: Nov 27, 2018
  • Latest release: Dec 17, 2019
  • Number of updates: 15
  • Update frequency: every 26.3 days
  • Top authors: benhallbenhall (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /4,479 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.13MB] [CPU: ▼3.23ms] Passed 4 tests

Server-side resources used by WPDevHub Troubleshooting Guides
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1734.92 ▼9.24
Dashboard /wp-admin3.46 ▲0.1544.95 ▼2.38
Posts /wp-admin/edit.php3.52 ▲0.1645.76 ▼0.66
Add New Post /wp-admin/post-new.php6.00 ▲0.1185.96 ▼0.62
Media Library /wp-admin/upload.php3.32 ▲0.0936.84 ▲1.13
All Guides /wp-admin/edit.php?post_type=dtg_quide3.4339.96
Settings /wp-admin/edit.php?post_type=dtg_quide&page=wpdevhub-dtg-settings3.3232.13
Tags /wp-admin/edit-tags.php?taxonomy=dtg_guide_tag&post_type=dtg_quide3.3131.48
Add New /wp-admin/post-new.php?post_type=dtg_quide3.5452.73
Categories /wp-admin/edit-tags.php?taxonomy=dtg_guide_category&post_type=dtg_quide3.3134.71

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 73 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
wpdevhub-dtg-db-version
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by WPDevHub Troubleshooting Guides
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,853 ▲10713.28 ▼1.101.55 ▼0.1839.64 ▼1.80
Dashboard /wp-admin2,252 ▲615.87 ▼0.2299.33 ▼5.3939.23 ▼2.43
Posts /wp-admin/edit.php2,135 ▲462.03 ▲0.0143.49 ▲6.2037.35 ▲0.25
Add New Post /wp-admin/post-new.php1,552 ▲1917.47 ▼5.81639.69 ▲15.1352.83 ▼6.63
Media Library /wp-admin/upload.php1,437 ▲494.25 ▲0.0696.50 ▲0.8943.89 ▲0.78
All Guides /wp-admin/edit.php?post_type=dtg_quide1,1661.9934.6830.18
Settings /wp-admin/edit.php?post_type=dtg_quide&page=wpdevhub-dtg-settings8741.7124.2339.44
Tags /wp-admin/edit-tags.php?taxonomy=dtg_guide_tag&post_type=dtg_quide1,2772.1628.1327.36
Add New /wp-admin/post-new.php?post_type=dtg_quide2,7717.97172.6468.84
Categories /wp-admin/edit-tags.php?taxonomy=dtg_guide_category&post_type=dtg_quide1,3112.1627.0927.82

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The uninstall procedure has failed, leaving 7 options in the database
    • wpdevhub-dtg-db-version
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
  • 15× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'DSCF_DTG_VirtualPages_PageInterface' not found in wp-content/plugins/wpdevhub-troubleshooting-guides/classes/vp/class.DSCF_DTG_VirtualPages_Page.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'DSCF_DTG_StandardMetaBox' not found in wp-content/plugins/wpdevhub-troubleshooting-guides/classes/class.DSCF_DTG_TroubleshootingGuides_GuideShortCodeMetaBox.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'DSCF_DTG_StandardMetaBox' not found in wp-content/plugins/wpdevhub-troubleshooting-guides/classes/core/class.DSCF_DTG_StandardMetaBoxAndDbObject.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'DSCF_DTG_Utilities' not found in wp-content/plugins/wpdevhub-troubleshooting-guides/pages/inc.settings-base.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'DSCF_DTG_VirtualPages_ControllerInterface' not found in wp-content/plugins/wpdevhub-troubleshooting-guides/classes/vp/class.DSCF_DTG_VirtualPages_Controller.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function dimbal_add_define() in wp-content/plugins/wpdevhub-troubleshooting-guides/inc/inc.ver.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'DSCF_DTG_StandardMain' not found in wp-content/plugins/wpdevhub-troubleshooting-guides/classes/class.DSCF_DTG_TroubleshootingGuides_Main.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function dimbal_add_define() in wp-content/plugins/wpdevhub-troubleshooting-guides/inc/inc.env.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'DSCF_DTG_StandardCustomPostType' not found in wp-content/plugins/wpdevhub-troubleshooting-guides/classes/class.DSCF_DTG_TroubleshootingGuides_Guide.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function dimbal_add_define() in wp-content/plugins/wpdevhub-troubleshooting-guides/inc/inc.env-prod.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
1 plugin tags: troubleshooting guides help support

wpdevhub-troubleshooting-guides/index.php 92% from 13 tests

The main file in "WPDevHub Troubleshooting Guides" v. 2.9.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wpdevhub-troubleshooting-guides.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin7,499 lines of code in 44 files:
LanguageFilesBlank linesComment linesLines of code
PHP391,4162,0916,080
CSS210630783
JavaScript3127175636

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity26.84
▷ Minimum class complexity1.00
▷ Maximum class complexity240.00
Average method complexity2.93
▷ Minimum method complexity1.00
▷ Maximum method complexity95.00
Code structure
Namespaces0
Interfaces3
Traits0
Classes29
▷ Abstract classes00.00%
▷ Concrete classes29100.00%
▷ Final classes00.00%
Methods441
▷ Static methods30268.48%
▷ Public methods40291.16%
▷ Protected methods368.16%
▷ Private methods30.68%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants256
▷ Global constants41.56%
▷ Class constants25298.44%
▷ Public constants252100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
24 compressed PNG files occupy 0.17MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/document_layout.png0.91KB1.00KB0.00%
images/bricks.png2.18KB1.58KB▼ 27.33%
images/award_star_gold_3.png1.56KB1.49KB▼ 4.63%
images/no_saved_objects.png69.99KB57.68KB▼ 17.59%
images/page_edit.png1.38KB1.36KB▼ 0.85%