94% shortcode-locator

Code Review | Shortcode Locator

WordPress plugin Shortcode Locator scored 94% from 53 tests.

About plugin

  • Plugin page: shortcode-locator
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-4.6.1
  • WordPress version: 5.8.1
  • First release: Mar 2, 2015
  • Latest release: Nov 21, 2016
  • Number of updates: 9
  • Update frequency: every 70.1 days
  • Top authors: travislopes (100%)

Code review

53 tests

User reviews

3 reviews

Install metrics

40+ active / 1,802 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼275.48ms] Passed 4 tests

This is a short check of server-side resources used by Shortcode Locator
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.90 ▲0.1833.34 ▲8.80
Dashboard /wp-admin3.13 ▲0.0742.66 ▼7.24
Posts /wp-admin/edit.php3.24 ▲0.1345.34 ▲4.55
Add New Post /wp-admin/post-new.php5.49 ▲0.0691.96 ▼1,091.60
Media Library /wp-admin/upload.php3.07 ▲0.0630.31 ▼7.64
Shortcode Locator /wp-admin/options-general.php?page=shortcode_locator_settings3.0427.99
Shortcode Locator /wp-admin/tools.php?page=shortcode_locator3.0527.91

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Shortcode Locator
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,683 ▲7715.89 ▲0.418.09 ▼0.3250.63 ▲4.17
Dashboard /wp-admin2,937 ▲845.91 ▲0.06129.75 ▲0.17101.94 ▲0.68
Posts /wp-admin/edit.php2,716 ▲102.69 ▼0.0060.21 ▼6.9591.09 ▲2.45
Add New Post /wp-admin/post-new.php1,859 ▲20618.80 ▲0.20367.89 ▼13.62108.20 ▲8.28
Media Library /wp-admin/upload.php1,779 ▲105.01 ▼0.02175.57 ▲1.46105.37 ▼8.74
Shortcode Locator /wp-admin/options-general.php?page=shortcode_locator_settings1,0062.0953.1863.16
Shortcode Locator /wp-admin/tools.php?page=shortcode_locator1,3142.0953.1866.41

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
This plugin's uninstaller ran successfully

Smoke tests 75% 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 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
Please take a closer look at the following
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > 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/shortcode-locator/includes/class-shortcode-locator-table.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/shortcode-locator/includes/class-shortcode-locator-table.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/shortcode-locator/includes/class-shortcode-locator-table.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/shortcode-locator/includes/class-shortcode-locator-table.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/shortcode-locator/includes/class-shortcode-locator-table.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/shortcode-locator/includes/class-shortcode-locator-table.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 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
3 plugin tags: post types, find content, shortcode

shortcode-locator/shortcode-locator.php Passed 13 tests

Analyzing the main PHP file in "Shortcode Locator" version 1.1.1
56 characters long description:
Quickly locate what and where shortcodes are being used

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected295 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP3222446295

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity9.00
▷ Minimum class complexity8.00
▷ Maximum class complexity10.00
Average method complexity1.83
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods29
▷ Static methods26.90%
▷ Public methods2482.76%
▷ Protected methods517.24%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin