89% custom-html-js-shortcodes-by-anwppro

Code Review | Custom HTML & JS Shortcodes by AnWP.pro

WordPress plugin Custom HTML & JS Shortcodes by AnWP.pro scored89%from 54 tests.

About plugin

  • Plugin page: custom-html-js-sh...
  • Plugin version: 0.2.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-4.9.4
  • WordPress version: 6.3.1
  • First release: Feb 20, 2018
  • Latest release: Feb 25, 2018
  • Number of updates: 3
  • Update frequency: every 1.7 days
  • Top authors: anwppro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /879 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼5.06ms] Passed 4 tests

An overview of server-side resources used by Custom HTML & JS Shortcodes by AnWP.pro
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0641.80 ▲3.77
Dashboard /wp-admin3.36 ▲0.0546.64 ▼0.23
Posts /wp-admin/edit.php3.47 ▲0.1248.54 ▼0.34
Add New Post /wp-admin/post-new.php5.94 ▲0.0682.68 ▼20.19
Media Library /wp-admin/upload.php3.28 ▲0.0534.78 ▲0.53
All Shortcodes /wp-admin/edit.php?post_type=anwp_code3.3235.17
Add New Shortcode /wp-admin/post-new.php?post_type=anwp_code3.3239.28

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Custom HTML & JS Shortcodes by AnWP.pro: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲8413.26 ▼1.491.73 ▲0.0443.48 ▼0.87
Dashboard /wp-admin2,233 ▲454.88 ▼0.02112.11 ▲8.9138.54 ▼2.62
Posts /wp-admin/edit.php2,116 ▲272.04 ▲0.0140.29 ▼0.2934.97 ▲1.17
Add New Post /wp-admin/post-new.php1,544 ▲1123.27 ▲5.06676.10 ▲70.8263.10 ▼8.61
Media Library /wp-admin/upload.php1,418 ▲274.19 ▼0.01100.51 ▲6.8542.01 ▲0.45
All Shortcodes /wp-admin/edit.php?post_type=anwp_code1,0881.9530.7328.99
Add New Shortcode /wp-admin/post-new.php?post_type=anwp_code1,6065.00107.4762.67

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
9 plugin tags: short code, snippets, custom js, shortcodes, embed js...

custom-html-js-shortcodes-by-anwppro/anwp-custom-html-js.php 85% from 13 tests

"Custom HTML & JS Shortcodes by AnWP.pro" version 0.2.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • 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: Name the main plugin file the same as the plugin slug ("custom-html-js-shortcodes-by-anwppro.php" instead of "anwp-custom-html-js.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin703 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP5180540493
PO File25390167
Sass16317
CSS15115
JSON10011

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity24.67
▷ Minimum class complexity14.00
▷ Maximum class complexity32.00
Average method complexity2.73
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes133.33%
Methods42
▷ Static methods511.90%
▷ Public methods4095.24%
▷ Protected methods12.38%
▷ Private methods12.38%
Functions6
▷ Named functions466.67%
▷ Anonymous functions233.33%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected