84% dont-muck-my-markup

Code Review | Don't Muck My Markup

WordPress plugin Don't Muck My Markup scored84%from 54 tests.

About plugin

  • Plugin page: dont-muck-my-markup
  • Plugin version: 1.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-5.3
  • WordPress version: 6.3.1
  • First release: Dec 30, 2012
  • Latest release: Nov 17, 2019
  • Number of updates: 26
  • Update frequency: every 96.7 days
  • Top authors: Martyn Chamberlin (100%)

Code review

54 tests

User reviews

17 reviews

Install metrics

3,000+ active /49,909 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼9.32ms] Passed 4 tests

A check of server-side resources used by Don't Muck My Markup
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0240.28 ▼12.77
Dashboard /wp-admin3.33 ▲0.0354.40 ▼1.48
Posts /wp-admin/edit.php3.38 ▲0.0353.52 ▼3.70
Add New Post /wp-admin/post-new.php5.91 ▲0.0388.70 ▼19.34
Media Library /wp-admin/upload.php3.25 ▲0.0338.26 ▲1.45
Don't Muck My Markup /wp-admin/tools.php?page=dont-muck-my-markup3.2234.50

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Don't Muck My Markup
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.34 ▼0.181.87 ▲0.0543.34 ▼6.84
Dashboard /wp-admin2,202 ▲255.49 ▼0.1790.51 ▼10.8740.28 ▼7.47
Posts /wp-admin/edit.php2,107 ▲72.00 ▼0.0035.96 ▼0.7536.07 ▼2.82
Add New Post /wp-admin/post-new.php6,222 ▲4,69625.95 ▲2.07927.57 ▲232.8754.94 ▼12.57
Media Library /wp-admin/upload.php1,401 ▼24.20 ▲0.01102.65 ▲0.9241.52 ▼2.72
Don't Muck My Markup /wp-admin/tools.php?page=dont-muck-my-markup8162.0227.6228.99

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% 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 items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'DMMM' not found in wp-content/plugins/dont-muck-my-markup/class/view.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/dont-muck-my-markup/dont-muck-my-markup.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'DMMM' not found in wp-content/plugins/dont-muck-my-markup/class/admin.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: wpautop, disable auto formatting, remove markup, default formatting

dont-muck-my-markup/dont-muck-my-markup.php 92% from 13 tests

The main PHP script in "Don't Muck My Markup" version 1.8 is automatically included on every request by WordPress
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 291 characters long)

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
There were no executable files found in this plugin130 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP33049130

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity6.00
▷ Minimum class complexity1.00
▷ Maximum class complexity12.00
Average method complexity2.36
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods11
▷ Static methods545.45%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
No PNG images were found in this plugin