10% 42u-html5-upgrade

Code Review | 42U HTML5 Upgrade

WordPress plugin 42U HTML5 Upgrade scored 10% from 54 tests.

About plugin

  • Plugin page: 42u-html5-upgrade
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.4.1
  • WordPress version: 5.9.2
  • First release: Aug 10, 2012
  • Latest release: Sep 6, 2012
  • Number of updates: 32
  • Update frequency: every 1.7 days
  • Top authors: 42urick (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 2,632 total downloads

Benchmarks

Plugin footprint 57% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/42u-html5-upgrade/inc/FTU.php+430
    Methods with the same name as their class will not be constructors in a future version of PHP; WP_Widget_Taxonomy_Terms has a deprecated constructor

Server metrics [RAM: ▼2.18MB] [CPU: ▼354.10ms] Passed 4 tests

Server-side resources used by 42U HTML5 Upgrade
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.13 ▼0.995.19 ▼18.61
Dashboard /wp-admin2.15 ▼1.264.95 ▼30.58
Posts /wp-admin/edit.php2.15 ▼1.495.48 ▼33.80
Add New Post /wp-admin/post-new.php2.15 ▼4.825.05 ▼1,331.57
Media Library /wp-admin/upload.php2.15 ▼1.155.19 ▼20.44
42 Umbrellas /wp-admin/admin.php?page=42-Umbrellas2.154.98
HTML5 Options /wp-admin/admin.php?page=42u-html5-upgrade/42UHTML5.php2.154.32

Server storage [IO: ▲0.58MB] [DB: ▲0.00MB] 67% from 3 tests

Input-output and database impact of this plugin
Please fix the following
  • Illegal file modification detected: 3 files (5.58KB) outside of "wp-content/plugins/42u-html5-upgrade/" and "wp-content/uploads/"
    • (new file) wp-includes/js/tinymce/plugins/visualblocks/editor_plugin.js
    • (new file) wp-includes/js/tinymce/plugins/visualblocks/css/visualblocks.css
    • (new file) wp-includes/js/tinymce/plugins/visualblocks/editor_plugin_src.js
Filesystem: 20 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for 42U HTML5 Upgrade
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,116 ▲36216.25 ▲0.4610.26 ▲3.9817.82 ▲15.11
Dashboard /wp-admin3,072 ▲2186.94 ▲0.72124.83 ▼15.93216.41 ▲48.53
Posts /wp-admin/edit.php2,866 ▲2093.02 ▼0.2374.20 ▲10.02144.37 ▼5.02
Add New Post /wp-admin/post-new.php1,785 ▲12421.11 ▲3.98441.96 ▲3.89189.43 ▼16.66
Media Library /wp-admin/upload.php1,873 ▲1755.98 ▲0.55157.67 ▲19.43223.84 ▲40.44
42 Umbrellas /wp-admin/admin.php?page=42-Umbrellas1,2152.8364.13114.51
HTML5 Options /wp-admin/admin.php?page=42u-html5-upgrade/42UHTML5.php1,2132.8760.69120.99

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/42u-html5-upgrade/inc/FTU.php+430
    Methods with the same name as their class will not be constructors in a future version of PHP; WP_Widget_Taxonomy_Terms has a deprecated constructor

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=42u-html5-upgrade/42UHTML5.php
    • > Deprecated in wp-content/plugins/42u-html5-upgrade/inc/FTU.php+430
    Methods with the same name as their class will not be constructors in a future version of PHP; WP_Widget_Taxonomy_Terms has a deprecated constructor
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=42u-html5-upgrade/42UHTML5.php
    • > Warning in wp-content/plugins/42u-html5-upgrade/inc/FTU.php+72
    Use of undefined constant FTU_VERSION - assumed 'FTU_VERSION' (this will throw an Error in a future version of PHP)
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=42u-html5-upgrade/42UHTML5.php
    • > Notice in wp-content/plugins/42u-html5-upgrade/42UHTML5.php+210
    Trying to access array offset on value of type bool

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
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/42u-html5-upgrade/inc/splash.php
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/42u-html5-upgrade/inc/FTU.php:38
    • > PHP Warning
      Use of undefined constant FTU_VERSION - assumed 'FTU_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/42u-html5-upgrade/inc/FTU.php on line 72
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/42u-html5-upgrade/inc/FTU.php:38
    • > PHP Warning
      Use of undefined constant FTU_VERSION - assumed 'FTU_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/42u-html5-upgrade/inc/FTU.php on line 72

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 Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
1 plugin tags: html5

42u-html5-upgrade/42UHTML5.php 85% from 13 tests

This is the main PHP file of "42U HTML5 Upgrade" version 1.1.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 147 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("42u-html5-upgrade.php" instead of "42UHTML5.php")

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
There were no executable files found in this plugin824 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP3207141756
JavaScript3101444
CSS32124

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity11.71
▷ Minimum class complexity6.00
▷ Maximum class complexity21.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods45
▷ Static methods00.00%
▷ Public methods4497.78%
▷ Protected methods00.00%
▷ Private methods12.22%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
9 PNG files occupy 0.49MB with 0.16MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/images/42U_adminmenu16-sprite_2x.png2.00KB1.51KB▼ 24.19%
images/HTML5_adminmenu16-sprite_2x.png1.89KB1.20KB▼ 36.21%
images/HTML5_adminmenu16-sprite.png0.89KB0.68KB▼ 23.68%
inc/images/42U_adminpage32_2x.png3.26KB2.25KB▼ 30.80%
images/HTML5_adminpage32_2x.png2.20KB1.21KB▼ 44.93%