90% disable-theme-and-plugin-editor

Code Review | Disable Theme and Plugin Editor

WordPress plugin Disable Theme and Plugin Editor scored90%from 54 tests.

About plugin

  • Plugin page: disable-theme-and...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-3.8.1
  • WordPress version: 6.3.1
  • First release: Feb 3, 2014
  • Latest release: Feb 3, 2014
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: Master Farzad (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,023 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼12.13ms] Passed 4 tests

A check of server-side resources used by Disable Theme and Plugin Editor
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0034.10 ▼4.65
Dashboard /wp-admin3.31 ▼0.0443.83 ▼21.48
Posts /wp-admin/edit.php3.36 ▲0.0047.60 ▼4.50
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.97 ▼17.87
Media Library /wp-admin/upload.php3.23 ▲0.0034.24 ▲1.97

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Disable Theme and Plugin Editor
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,781 ▲2014.26 ▼0.101.55 ▼0.1537.33 ▼6.16
Dashboard /wp-admin2,187 ▲105.54 ▼0.0583.35 ▼3.2938.55 ▼4.44
Posts /wp-admin/edit.php2,095 ▼82.00 ▲0.0140.10 ▼2.6235.65 ▼3.30
Add New Post /wp-admin/post-new.php1,522 ▼423.22 ▼0.34670.24 ▼20.8446.85 ▼13.96
Media Library /wp-admin/upload.php1,389 ▼114.29 ▲0.12104.60 ▲6.1844.89 ▼0.92

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Looking good! No server-side errors or output on direct access of PHP files

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)
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 16 tag instead of maximum 10
The official readme.txt is a good inspiration

disable-theme-and-plugin-editor/disable-theme-and-plugin-editor.php Passed 13 tests

The entry point to "Disable Theme and Plugin Editor" version 1.1 is a PHP file that has certain tags in its header comment area
80 characters long description:
Disable Theme and Plugin Editors from WordPress Admin Panel for security reasons

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
Success! There were no dangerous files found in this plugin3 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1083

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin