63% shortcode-directives

Code Review | Shortcode Directives

WordPress plugin Shortcode Directives scored63%from 54 tests.

About plugin

  • Plugin page: shortcode-directives
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.3.2
  • WordPress version: 6.3.1
  • First release: Jan 9, 2020
  • Latest release: Jan 9, 2020
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: miunosoft (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /457 total downloads

Benchmarks

Plugin footprint 47% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲2.09MB] [CPU: ▲9.18ms] 75% from 4 tests

A check of server-side resources used by Shortcode Directives
Please fix the following
  • RAM: You should keep total memory usage under 10MB (currently 10.02MB on /wp-admin/tools.php?page=scd_settings)
PageMemory (MB)CPU Time (ms)
Home /4.76 ▲1.3045.20 ▲0.62
Dashboard /wp-admin5.65 ▲2.3558.98 ▲6.66
Posts /wp-admin/edit.php5.76 ▲2.4165.70 ▲16.31
Add New Post /wp-admin/post-new.php8.25 ▲2.36110.62 ▲15.16
Media Library /wp-admin/upload.php5.57 ▲2.3446.83 ▲14.27
Shortcode Directives /wp-admin/tools.php?page=scd_settings10.0277.58

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 323 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Shortcode Directives
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9413.21 ▼1.384.56 ▲2.5043.71 ▼0.73
Dashboard /wp-admin2,210 ▲335.86 ▼0.03111.67 ▼0.0346.63 ▼8.70
Posts /wp-admin/edit.php2,096 ▲72.02 ▼0.0440.64 ▼0.1535.35 ▼4.06
Add New Post /wp-admin/post-new.php1,537 ▲2323.15 ▲5.55662.74 ▲45.7667.84 ▲14.36
Media Library /wp-admin/upload.php1,392 ▲104.20 ▼0.03100.54 ▼2.6943.11 ▼3.41
Shortcode Directives /wp-admin/tools.php?page=scd_settings1,4522.3540.3169.83

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Compile error in wp-content/plugins/shortcode-directives/shortcode-directives.php+18
    Cannot declare class ShortcodeDirectives_Registry_Base, because the name is already in use
  • Uninstaller has failed for this plugin, leaving 323 files (1.77MB) in the plugin directory
    • (new file) include/library/apf/custom-field-types/select2-custom-field-type/select2/LICENSE.md
    • (new file) include/library/apf/admin-page-framework.php
    • (new file) include/library/apf/custom-field-types/post_type_taxonomy_field-type/PostTypeTaxonomyCustomFieldType.php
    • (new file) include/library/apf/custom-field-types/select2-custom-field-type/Select2CustomFieldType.php
    • (new file) include/library/apf/admin-page-framework-include-class-list.php
    • (new file) include/ShortcodeDirectives_Bootstrap.php
    • (new file) include/class-list.php
    • (new file) include/library/apf/custom-field-types/select2-custom-field-type/changelog.txt
    • (new file) include/library/apf/custom-field-types/post_type_taxonomy_field-type/changelog.txt
    • (new file) include/library/apf/LICENSE.txt
    • ...
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • recovery_mode_email_last_sent
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
Almost there! Just fix the following items
  • 241× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'ShortcodeDirectives_AdminPage__FormSection_Base' not found in wp-content/plugins/shortcode-directives/include/main/admin/setting/data/ShortcodeDirectives_AdminPage__FormSection_DoReset.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'ShortcodeDirectives_AdminPageFramework' not found in wp-content/plugins/shortcode-directives/include/library/apf/factory/network_admin_page/AdminPageFramework_NetworkAdmin.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'ShortcodeDirectives_AdminPageFramework_FrameworkUtility' not found in wp-content/plugins/shortcode-directives/include/library/apf/factory/post_type/_model/AdminPageFramework_PostType_Model__SubMenuOrder.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'ShortcodeDirectives_AdminPageFramework_Property_post_meta_box' not found in wp-content/plugins/shortcode-directives/include/library/apf/factory/taxonomy_field/_model/AdminPageFramework_Property_taxonomy_field.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'ShortcodeDirectives_AdminPageFramework_FrameworkUtility' not found in wp-content/plugins/shortcode-directives/include/library/apf/factory/_common/_abstract/_model/AdminPageFramework_Factory_Model___Meta_Base.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'ShortcodeDirectives_AdminPageFramework_Link_admin_page' not found in wp-content/plugins/shortcode-directives/include/library/apf/factory/network_admin_page/_controller/AdminPageFramework_Link_network_admin_page.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'ShortcodeDirectives_AdminPage__FormSection_Base' not found in wp-content/plugins/shortcode-directives/include/main/admin/setting/data/ShortcodeDirectives_AdminPage__FormSection_Import.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'ShortcodeDirectives_AdminPageFramework_Form_View___CSS_Base' not found in wp-content/plugins/shortcode-directives/include/library/apf/factory/_common/form/_view/css/AdminPageFramework_Form_View___CSS_FieldError.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'ShortcodeDirectives_AdminPageFramework_PageLoadInfo_Base' not found in wp-content/plugins/shortcode-directives/include/library/apf/factory/admin_page/_view/AdminPageFramework_PageLoadInfo_admin_page.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'ShortcodeDirectives_PluginUtility' not found in wp-content/plugins/shortcode-directives/include/main/admin/_abstract/ShortcodeDirectives_AdminPage__Element_Base.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
10 plugin tags: directives, posts, commands, tool, command...

shortcode-directives/shortcode-directives.php 77% from 13 tests

The entry point to "Shortcode Directives" version 1.0.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Domain Path: The domain path should be prefixed with a forward slash character ("/language")
  • Text Domain: Please use dashes and lowercase characters for text domains
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("language")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected28,392 lines of code in 318 files:
LanguageFilesBlank linesComment linesLines of code
PHP2601,3033,44718,457
JavaScript522,4376599,232
CSS4575432
Markdown2730271

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity6.93
▷ Minimum class complexity1.00
▷ Maximum class complexity159.00
Average method complexity2.18
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes369
▷ Abstract classes10027.10%
▷ Concrete classes26972.90%
▷ Final classes41.49%
Methods1,855
▷ Static methods25913.96%
▷ Public methods99253.48%
▷ Protected methods34118.38%
▷ Private methods52228.14%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants27
▷ Global constants13.70%
▷ Class constants2696.30%
▷ Public constants26100.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
There were not PNG files found in your plugin