73% add-actions-and-filters

Code Review | Add Shortcodes Actions And Filters

WordPress plugin Add Shortcodes Actions And Filters scored 73% from 54 tests.

About plugin

  • Plugin page: add-actions-and-f...
  • Plugin version: 2.0.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.5.2
  • WordPress version: 5.9.2
  • First release: May 6, 2013
  • Latest release: Jul 26, 2016
  • Number of updates: 150
  • Update frequency: every 12.9 days
  • Top authors: msimpson (100%)

Code review

54 tests

User reviews

20 reviews

Install metrics

3,000+ active / 25,939 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼293.40ms] Passed 4 tests

Analyzing server-side resources used by Add Shortcodes Actions And Filters
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.0961.32 ▲13.76
Dashboard /wp-admin3.45 ▲0.0437.04 ▲3.25
Posts /wp-admin/edit.php3.67 ▲0.0441.01 ▲4.83
Add New Post /wp-admin/post-new.php6.91 ▼0.0698.10 ▼1,184.17
Media Library /wp-admin/upload.php3.33 ▲0.0327.03 ▲2.51
Shortcodes, Actions and Filters /wp-admin/tools.php?page=ShortcodesActionsFilters3.4329.01
Shortcodes, Actions and Filters Import/Export /wp-admin/admin.php?page=ShortcodesActionsFiltersImpExp3.3423.44
Shortcodes, Actions and Filters Settings /wp-admin/admin.php?page=ShortcodesActionsFiltersSettings3.3523.09

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 162 new files
Database: 1 new table, 2 new options
New tables
wp_addactionsandfilters_plugin_usercode
New WordPress options
AddActionsAndFilters_Plugin__version
AddActionsAndFilters_Plugin__installed

Browser metrics Passed 4 tests

A check of browser resources used by Add Shortcodes Actions And Filters
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,786 ▲4415.60 ▼0.066.32 ▲0.513.05 ▲0.73
Dashboard /wp-admin2,880 ▲226.10 ▼0.18119.70 ▼17.76152.98 ▼8.24
Posts /wp-admin/edit.php2,696 ▲23.24 ▲0.0165.99 ▲1.72141.05 ▲1.04
Add New Post /wp-admin/post-new.php1,755 ▲9521.49 ▲4.79442.31 ▲23.29155.45 ▼2.00
Media Library /wp-admin/upload.php1,703 ▲85.51 ▼0.02144.88 ▼0.58190.46 ▲1.07
Shortcodes, Actions and Filters /wp-admin/tools.php?page=ShortcodesActionsFilters1,3462.6254.3791.04
Shortcodes, Actions and Filters Import/Export /wp-admin/admin.php?page=ShortcodesActionsFiltersImpExp1,0482.4054.7798.73
Shortcodes, Actions and Filters Settings /wp-admin/admin.php?page=ShortcodesActionsFiltersSettings1,1802.4155.24117.73

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_addactionsandfilters_plugin_usercode
  • The uninstall procedure has failed, leaving 2 options in the database
    • AddActionsAndFilters_Plugin__version
    • AddActionsAndFilters_Plugin__installed

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 4× 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/add-actions-and-filters/AddActionsAndFilters_CodeListTable.php on line 26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/add-actions-and-filters/add-actions-and-filters.php:67
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/add-actions-and-filters/AddActionsAndFilters_CodeListTable.php on line 26
    • > 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/add-actions-and-filters/AddActionsAndFilters_CodeListTable.php on line 26

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots do not have images: #1 (Dashboard page for code listings), #2 (Dashboard page for editing a shortcode), #3 (Dashboard page for editing a filter), #4 (Dashboard page for editing an action), #5 (Dashboard page for import/export to/from file and import from Shortcode Exec PHP)
Please take inspiration from this readme.txt

add-actions-and-filters/add-actions-and-filters.php 92% from 13 tests

The primary PHP file in "Add Shortcodes Actions And Filters" version 2.0.9 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 304 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected26,032 lines of code in 146 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript712,1361,99021,993
CSS553602312,044
PHP204771,0781,995

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity10.78
▷ Minimum class complexity1.00
▷ Maximum class complexity29.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes18
▷ Abstract classes00.00%
▷ Concrete classes18100.00%
▷ Final classes00.00%
Methods176
▷ Static methods31.70%
▷ Public methods15085.23%
▷ Protected methods2614.77%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
10 PNG files occupy 0.72MB with 0.36MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png128.10KB38.28KB▼ 70.11%
img/import-export.png1.67KB1.34KB▼ 19.63%
screenshot-5.png142.80KB39.95KB▼ 72.02%
img/icon-20x20.png0.78KB0.65KB▼ 16.38%
screenshot-4.png171.21KB47.99KB▼ 71.97%