88% digthis-action-filters

Code Review | Digthis Show Action Hook

WordPress plugin Digthis Show Action Hook scored 88% from 54 tests.

About plugin

  • Plugin page: digthis-action-fi...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.7
  • WordPress version: 5.8.1
  • First release: Dec 28, 2016
  • Latest release: Jan 16, 2017
  • Number of updates: 12
  • Update frequency: every 1.5 days
  • Top authors: digamberpradhan (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active / 732 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by Digthis Show Action Hook
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.92 ▲0.2039.07 ▲17.50
Dashboard /wp-admin3.13 ▲0.0746.02 ▼0.79
Posts /wp-admin/edit.php3.21 ▲0.1047.07 ▼1.74
Add New Post /wp-admin/post-new.php5.48 ▲0.0594.39 ▼569.58
Media Library /wp-admin/upload.php3.07 ▲0.0640.29 ▲6.07

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 13 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Digthis Show Action Hook
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /5,788 ▲2,19216.75 ▲1.1726.39 ▲17.5255.07 ▲4.44
Dashboard /wp-admin2,987 ▲535.91 ▼0.05143.59 ▼17.36119.48 ▲6.98
Posts /wp-admin/edit.php2,759 ▲202.69 ▲0.0173.27 ▲0.2595.32 ▲2.79
Add New Post /wp-admin/post-new.php1,696 ▲11518.68 ▼1.94400.84 ▼8.18120.58 ▲5.38
Media Library /wp-admin/upload.php1,827 ▲205.01 ▼0.01159.36 ▲3.24133.76 ▲4.39

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
Uninstall script ran successfully

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/digthis-action-filters/view/front-end.php
    • > /wp-content/plugins/digthis-action-filters/view/admin.php
    • > /wp-content/plugins/digthis-action-filters/digthis-show-actions-filters.php
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/digthis-action-filters/includes/class-digthis-show-action-filters.php:177
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/digthis-action-filters/view/admin.php on line 12
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/digthis-action-filters/view/front-end.php on line 12

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === digthis-action-filters === )
The official readme.txt is a good inspiration

digthis-action-filters/digthis-show-actions-filters.php 85% from 13 tests

The main PHP script in "Digthis Show Action Hook" version 1.0.1 is automatically included on every request by WordPress
You should first fix the following items:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("digthis-action-filters.php" instead of "digthis-show-actions-filters.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin2,232 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript53891621,374
PHP510649547
CSS2356311

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity23.50
▷ Minimum class complexity4.00
▷ Maximum class complexity43.00
Average method complexity3.14
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods21
▷ Static methods1257.14%
▷ Public methods2095.24%
▷ Protected methods00.00%
▷ Private methods14.76%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG files were detected