84% limited-editor

Code Review | Limited Editor

WordPress plugin Limited Editor scored84%from 54 tests.

About plugin

  • Plugin page: limited-editor
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-6.3
  • WordPress version: 6.3.1
  • First release: Mar 2, 2023
  • Latest release: Sep 6, 2023
  • Number of updates: 6
  • Update frequency: every 31.3 days
  • Top authors: sixaxis (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /125 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

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

Analyzing server-side resources used by Limited Editor
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.07 ▲0.48
Dashboard /wp-admin3.31 ▲0.0145.41 ▼1.01
Posts /wp-admin/edit.php3.36 ▲0.0055.16 ▲0.56
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.41 ▼26.50
Media Library /wp-admin/upload.php3.23 ▲0.0037.88 ▲1.40

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Limited Editor: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.20 ▼1.181.75 ▼0.0243.34 ▼4.15
Dashboard /wp-admin2,206 ▲155.84 ▼0.07108.57 ▼1.2241.78 ▲0.41
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0241.72 ▼0.7035.87 ▼0.76
Add New Post /wp-admin/post-new.php1,514 ▼1917.86 ▼5.12695.23 ▲85.4958.34 ▲8.04
Media Library /wp-admin/upload.php1,385 ▼34.18 ▼0.0297.24 ▼1.4341.05 ▼4.41

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/limited-editor/limited-editor.php:34

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 issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: seo editor, new role, limited editor, user permissions

limited-editor/limited-editor.php Passed 13 tests

The primary PHP file in "Limited Editor" version 1.0 is used by WordPress to initiate all plugin functionality
117 characters long description:
Adds a new user role "Limited editor" to WordPress when activating the plugin. After that, the plugin can be removed.

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

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
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%
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

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin