72% htm-customareas

Code Review | HTM Custom Areas

WordPress plugin HTM Custom Areas scored72%from 54 tests.

About plugin

  • Plugin page: htm-customareas
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.1.2
  • WordPress version: 6.3.1
  • First release: Apr 10, 2015
  • Latest release: Apr 22, 2015
  • Number of updates: 5
  • Update frequency: every 2.4 days
  • Top authors: oliverhtml (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,001 total downloads

Benchmarks

Plugin footprint 83% from 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.06MB] [CPU: ▼6.13ms] Passed 4 tests

A check of server-side resources used by HTM Custom Areas
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0739.73 ▼2.94
Dashboard /wp-admin3.36 ▲0.0651.08 ▼1.54
Posts /wp-admin/edit.php3.48 ▲0.1253.10 ▼13.89
Add New Post /wp-admin/post-new.php5.94 ▲0.0695.37 ▼3.84
Media Library /wp-admin/upload.php3.29 ▲0.0635.20 ▼3.84
Add New /wp-admin/post-new.php?post_type=custom_area3.4254.21
Custom Areas /wp-admin/edit.php?post_type=custom_area3.3338.38
Custom Area Options /wp-admin/edit.php?post_type=custom_area&page=htmcas-options3.3332.44

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 27 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts
HTMCustomAreasVersion
HTMCAS-options
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

HTM Custom Areas: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,861 ▲9014.78 ▲0.482.11 ▲0.1342.99 ▲2.00
Dashboard /wp-admin2,237 ▲464.85 ▼0.25100.18 ▼6.7543.01 ▼3.05
Posts /wp-admin/edit.php2,120 ▲311.99 ▼0.0139.10 ▲2.1035.04 ▲0.21
Add New Post /wp-admin/post-new.php1,545 ▲722.71 ▲4.43645.99 ▼52.8754.97 ▼3.91
Media Library /wp-admin/upload.php1,419 ▲314.16 ▼0.0595.21 ▼5.9943.96 ▼2.55
Add New /wp-admin/post-new.php?post_type=custom_area2,2267.59171.3171.44
Custom Areas /wp-admin/edit.php?post_type=custom_area1,0841.9530.8630.36
Custom Area Options /wp-admin/edit.php?post_type=custom_area&page=htmcas-options1,1201.7623.4626.66

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 4× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/htm-customareas/lib/admin/templates/linkmeta.php
    • > /wp-content/plugins/htm-customareas/lib/admin/templates/ajaxlookup.php
    • > /wp-content/plugins/htm-customareas/lib/frontend/templates/content.php
    • > /wp-content/plugins/htm-customareas/lib/admin/templates/shortcodebox.php
  • 40× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Warning
      require_once(ABSPATH/wp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/htm-customareas/plugin.php on line 11
    • > PHP Fatal error
      Uncaught Error: Class 'HTMCustomAreasController' not found in wp-content/plugins/htm-customareas/lib/admin/controller/admin.php:7
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/htm-customareas/lib/admin/templates/ajaxlookup.php on line 26
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATH/wp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/htm-customareas/plugin.php on line 11
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/htm-customareas/lib/admin/templates/ajaxlookup.php on line 27
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/htm-customareas/lib/admin/templates/ajaxlookup.php on line 18
    • > PHP Notice
      Undefined variable: saved in wp-content/plugins/htm-customareas/lib/admin/templates/admin.php on line 4
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/htm-customareas/lib/admin/templates/ajaxlookup.php on line 68
    • > PHP Fatal error
      Uncaught Error: Class 'HTMCustomAreasController' not found in wp-content/plugins/htm-customareas/lib/frontend/controller/shortcodes.php:7
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/htm-customareas/lib/admin/templates/ajaxlookup.php on line 28

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
    • > GET request to /wp-admin/post-new.php?post_type=custom_area
    • > Network (severe)
    wp-content/plugins/htm_customareas/assets/css/linkinput.css - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/edit.php?post_type=custom_area&page=htmcas-options
    • > Network (severe)
    wp-content/plugins/htm_customareas/assets/script/ui-tabs.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/edit.php?post_type=custom_area&page=htmcas-options
    • > Network (severe)
    wp-content/plugins/htm_customareas/assets/css/admin.css - Failed to load resource: the server responded with a status of 404 (Not Found)

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:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === htm-customareas === )
Please take inspiration from this readme.txt

htm-customareas/plugin.php 92% from 13 tests

"HTM Custom Areas" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("htm-customareas.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin1,334 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP16333259934
CSS44414273
JavaScript44837127

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity10.90
▷ Minimum class complexity1.00
▷ Maximum class complexity24.00
Average method complexity2.48
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods67
▷ Static methods00.00%
▷ Public methods5176.12%
▷ Protected methods710.45%
▷ Private methods913.43%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/css/customarea.png0.46KB0.41KB▼ 11.23%