84% hide-editor-for-page-templates

Code Review | Hide Editor for Page Templates

WordPress plugin Hide Editor for Page Templates scored84%from 54 tests.

About plugin

  • Plugin page: hide-editor-for-p...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-6.1.1
  • WordPress version: 6.3.1
  • First release: Nov 26, 2022
  • Latest release: Nov 27, 2022
  • Number of updates: 10
  • Update frequency: every 0.2 days
  • Top authors: rupash (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /493 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

This is a short check of server-side resources used by Hide Editor for Page Templates
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.55 ▼0.96
Dashboard /wp-admin3.34 ▲0.0443.49 ▼4.32
Posts /wp-admin/edit.php3.39 ▲0.0448.29 ▲0.67
Add New Post /wp-admin/post-new.php5.92 ▲0.0491.81 ▼3.17
Media Library /wp-admin/upload.php3.27 ▲0.0434.08 ▲2.16
Hide Editor /wp-admin/options-general.php?page=hide-editor3.2630.87

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Hide Editor for Page Templates
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.33 ▼1.104.26 ▲2.4241.27 ▲2.72
Dashboard /wp-admin2,207 ▲244.85 ▼0.0699.74 ▼7.4739.50 ▼5.85
Posts /wp-admin/edit.php2,093 ▲72.01 ▼0.0338.73 ▼1.9733.49 ▼4.36
Add New Post /wp-admin/post-new.php1,545 ▲1718.47 ▼0.09609.41 ▲0.5354.03 ▼5.88
Media Library /wp-admin/upload.php1,392 ▲74.20 ▼0.0096.00 ▼4.4242.61 ▲0.83
Hide Editor /wp-admin/options-general.php?page=hide-editor7981.9035.3825.06

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

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
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 1× 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/hide-editor-for-page-templates/hide-editor-for-page-templates.php:133

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed: You can take inspiration from this readme.txt

hide-editor-for-page-templates/hide-editor-for-page-templates.php 92% from 13 tests

The principal PHP file in "Hide Editor for Page Templates" v. 1.0.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin135 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP1211122
JavaScript20112
CSS1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
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
There are no PNG files in this plugin