64% disable-contect-editor-for-specific-template

Code Review | Disable Content Editor For Specific Template

WordPress plugin Disable Content Editor For Specific Template scored64%from 54 tests.

About plugin

  • Plugin page: disable-contect-e...
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0-4.9
  • WordPress version: 6.3.1
  • First release: Nov 4, 2015
  • Latest release: Mar 19, 2018
  • Number of updates: 22
  • Update frequency: every 39.4 days
  • Top authors: mynamevenu24 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,701 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▼0.90MB] [CPU: ▼36.58ms] Passed 4 tests

An overview of server-side resources used by Disable Content Editor For Specific Template
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0137.80 ▼1.76
Dashboard /wp-admin3.04 ▼0.2724.35 ▼23.35
Posts /wp-admin/edit.php3.04 ▼0.3222.79 ▼28.20
Add New Post /wp-admin/post-new.php3.04 ▼2.8522.38 ▼84.40
Media Library /wp-admin/upload.php3.04 ▼0.1923.31 ▼10.38

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: 1 new table, 6 new options
New tables
wp_disable_content_editor
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Disable Content Editor For Specific Template
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲4313.32 ▼0.981.66 ▼0.1544.86 ▲5.73
Dashboard /wp-admin2,220 ▲384.84 ▼1.04113.12 ▲9.6042.92 ▼3.17
Posts /wp-admin/edit.php2,100 ▲81.99 ▼0.0135.66 ▼4.5832.37 ▼3.53
Add New Post /wp-admin/post-new.php1,549 ▲1618.24 ▼4.98623.09 ▼23.4250.33 ▼4.14
Media Library /wp-admin/upload.php1,402 ▲174.20 ▲0.0194.29 ▼3.2042.69 ▼0.37

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/disable-contect-editor-for-specific-template/disable-editor-specific-template.php+85
    Undefined index: post
  • Zombie tables were found after uninstall: 1 table
    • wp_disable_content_editor
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/disable-contect-editor-for-specific-template/disable-editor-specific-template.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (Select form dropdown for disable content editor) image missing
Please take inspiration from this readme.txt

disable-contect-editor-for-specific-template/disable-editor-specific-template.php 92% from 13 tests

The main file in "Disable Content Editor For Specific Template" v. 2.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("disable-contect-editor-for-specific-template.php" instead of "disable-editor-specific-template.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin128 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP25639100
CSS14328

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity3.00
▷ Minimum method complexity3.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.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
1 PNG file occupies 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png35.97KB16.43KB▼ 54.31%