84% dont-touch-my-code

Code Review | Don't touch my [code]

WordPress plugin Don't touch my [code] scored84%from 54 tests.

About plugin

  • Plugin page: dont-touch-my-code
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Jun 17, 2015
  • Latest release: Jun 17, 2015
  • Number of updates: 2
  • Update frequency: every 2.0 days
  • Top authors: honzanovak (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /680 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.00MB] [CPU: ▼10.45ms] Passed 4 tests

Analyzing server-side resources used by Don't touch my [code]
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.12 ▼4.18
Dashboard /wp-admin3.31 ▼0.0350.86 ▼12.00
Posts /wp-admin/edit.php3.36 ▲0.0147.56 ▼8.22
Add New Post /wp-admin/post-new.php5.89 ▲0.0190.56 ▼17.41
Media Library /wp-admin/upload.php3.24 ▲0.0141.27 ▲3.33

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Don't touch my [code]
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,792 ▲3114.35 ▼0.021.75 ▼0.0346.46 ▲2.62
Dashboard /wp-admin2,198 ▲215.57 ▼0.0990.74 ▼1.2137.08 ▼4.72
Posts /wp-admin/edit.php2,100 ▼01.98 ▼0.0335.10 ▼2.6935.56 ▼2.17
Add New Post /wp-admin/post-new.php1,529 ▲123.13 ▼0.03682.13 ▼7.5552.70 ▼3.07
Media Library /wp-admin/upload.php1,400 ▼04.20 ▲0.06107.68 ▼9.6553.23 ▲2.72

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/dont-touch-my-code/dont-touch-my-code.php:10

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

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === dont-touch-my-code === )
You can take inspiration from this readme.txt

dont-touch-my-code/dont-touch-my-code.php Passed 13 tests

The entry point to "Don't touch my [code]" version 0.2 is a PHP file that has certain tags in its header comment area
76 characters long description:
Adds [code] shortcode that saves your code from the WordPress WYSIWYG editor

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
Everything looks great! No dangerous files found in this plugin35 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP151235

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin