84% html-mode-locker

Code Review | HTML Mode Locker

WordPress plugin HTML Mode Locker scored84%from 54 tests.

About plugin

  • Plugin page: html-mode-locker
  • Plugin version: 0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.8
  • WordPress version: 6.3.1
  • First release: Aug 30, 2011
  • Latest release: Jan 13, 2014
  • Number of updates: 12
  • Update frequency: every 72.2 days
  • Top authors: maxchirkov (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

300+ active /6,756 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 gracefully, with no errors

Server metrics [RAM: ▼0.69MB] [CPU: ▼15.83ms] Passed 4 tests

Analyzing server-side resources used by HTML Mode Locker
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.49 ▲1.01
Dashboard /wp-admin3.32 ▲0.0145.76 ▼2.30
Posts /wp-admin/edit.php3.37 ▲0.0148.77 ▲0.83
Add New Post /wp-admin/post-new.php3.10 ▼2.7836.52 ▼62.74
Media Library /wp-admin/upload.php3.24 ▲0.0135.41 ▲0.90

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for HTML Mode Locker
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,873 ▲13813.54 ▼0.831.94 ▲0.1139.38 ▼9.45
Dashboard /wp-admin2,254 ▲665.94 ▲1.04107.23 ▼7.7539.36 ▼3.14
Posts /wp-admin/edit.php2,140 ▲512.32 ▲0.3249.12 ▲13.4633.92 ▼0.21
Add New Post /wp-admin/post-new.php1,540 ▼223.21 ▲4.73599.94 ▼42.0051.76 ▼5.23
Media Library /wp-admin/upload.php1,439 ▲514.39 ▲0.17100.10 ▲2.6442.09 ▼1.14

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/html-mode-locker/html-mode-locker.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/html-mode-locker/Class_Pointers.php:9

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

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Screenshots: Please add images for these screenshots: #1 (HTML Mode Locker settings under Settings => Writing.), #2 (HTML Mode Locker meta box in the post editor.)
You can look at the official readme.txt

html-mode-locker/html-mode-locker.php Passed 13 tests

"HTML Mode Locker" version 0.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
90 characters long description:
Adds and option to lock post editor in HTML Mode on selected post types on per-item basis.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected249 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP26032249

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin