78% htmlpress

Code Review | HTMLPress

WordPress plugin HTMLPress scored78%from 54 tests.

About plugin

  • Plugin page: htmlpress
  • Plugin version: 0.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.2.2
  • WordPress version: 6.3.1
  • First release: Feb 2, 2018
  • Latest release: Aug 8, 2023
  • Number of updates: 3
  • Update frequency: every 671.3 days
  • Top authors: surror (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,112 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.20MB] [CPU: ▼1.35ms] Passed 4 tests

A check of server-side resources used by HTMLPress
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2040.36 ▼5.32
Dashboard /wp-admin3.50 ▲0.1953.39 ▲1.26
Posts /wp-admin/edit.php3.61 ▲0.2551.68 ▲1.42
Add New Post /wp-admin/post-new.php6.14 ▲0.2594.17 ▼2.34
Media Library /wp-admin/upload.php3.42 ▲0.1936.98 ▲1.00
Add New Module /wp-admin/post-new.php?post_type=htmlpress3.5062.53
All Modules /wp-admin/edit.php?post_type=htmlpress3.4647.46
Categories /wp-admin/edit-tags.php?taxonomy=htmlpress-category&post_type=htmlpress3.4140.32

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 436 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for HTMLPress
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,984 ▲24915.04 ▲0.6531.64 ▲29.6741.14 ▼2.44
Dashboard /wp-admin2,240 ▲495.85 ▲0.95123.52 ▲0.0748.34 ▼0.45
Posts /wp-admin/edit.php2,120 ▲282.01 ▲0.0138.23 ▲2.1737.23 ▲4.27
Add New Post /wp-admin/post-new.php1,559 ▲2623.51 ▲0.45663.99 ▲14.2760.53 ▼13.07
Media Library /wp-admin/upload.php1,419 ▲284.19 ▼0.04101.68 ▼14.3146.05 ▲0.54
Add New Module /wp-admin/post-new.php?post_type=htmlpress1,8873.7196.1142.81
All Modules /wp-admin/edit.php?post_type=htmlpress1,1091.9737.0131.03
Categories /wp-admin/edit-tags.php?taxonomy=htmlpress-category&post_type=htmlpress1,2932.1335.0431.58

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=htmlpress-category&post_type=htmlpress
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+204
    Undefined offset: 0
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=htmlpress-category&post_type=htmlpress
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+205
    Trying to get property 'guid' of non-object
  • 28 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=htmlpress-category&post_type=htmlpress
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+221
    Trying to get property 'ID' of non-object
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=htmlpress-category&post_type=htmlpress
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+222
    Trying to get property 'post_title' of non-object

SRP 50% 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
The following issues need your attention
  • 21× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Warning
      include_once(): Failed opening 'HTMLPRESS_DIRclasses/class-render.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/htmlpress/classes/class-htmlpress.php on line 45
    • > PHP Warning
      include_once(HTMLPRESS_DIRclasses/class-shortcodes.php): failed to open stream: No such file or directory in wp-content/plugins/htmlpress/classes/class-htmlpress.php on line 46
    • > PHP Warning
      Use of undefined constant HTMLPRESS_DIR - assumed 'HTMLPRESS_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/htmlpress/classes/class-htmlpress.php on line 44
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/htmlpress/classes/class-shortcodes.php:38
    • > PHP Warning
      Use of undefined constant HTMLPRESS_DIR - assumed 'HTMLPRESS_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/htmlpress/classes/class-htmlpress.php on line 43
    • > PHP Warning
      include_once(): Failed opening 'HTMLPRESS_DIRclasses/class-post-type.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/htmlpress/classes/class-htmlpress.php on line 44
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/htmlpress/htmlpress.php:16
    • > PHP Warning
      include_once(): Failed opening 'HTMLPRESS_DIRclasses/class-helper.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/htmlpress/classes/class-htmlpress.php on line 42
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/htmlpress/classes/class-post-type.php:40
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/htmlpress/classes/class-ajax.php:44

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 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Screenshots: Please describe screenshot #1 in htmlpress/assets to your readme.txt
The official readme.txt is a good inspiration

htmlpress/htmlpress.php Passed 13 tests

"HTMLPress" version 0.1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
31 characters long description:
Simple HTML snippets generator.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected45,753 lines of code in 430 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript4108,0106,92040,093
CSS10269414,518
PHP8194433693
SVG100414
HTML14035

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity12.00
▷ Minimum class complexity2.00
▷ Maximum class complexity29.00
Average method complexity2.74
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods38
▷ Static methods2155.26%
▷ Public methods38100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

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