84% simple-user-meta-editor

Code Review | Simple User Meta Editor

WordPress plugin Simple User Meta Editor scored84%from 54 tests.

About plugin

  • Plugin page: simple-user-meta-...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.6
  • WordPress version: 6.3.1
  • First release: Aug 28, 2016
  • Latest release: Aug 28, 2016
  • Number of updates: 4
  • Update frequency: every 0.8 days
  • Top authors: anjan011 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /1,953 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
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Simple User Meta Editor
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0041.11 ▼6.12
Dashboard /wp-admin3.35 ▲0.0548.06 ▼0.66
Posts /wp-admin/edit.php3.40 ▲0.0545.18 ▼5.10
Add New Post /wp-admin/post-new.php5.93 ▲0.0587.05 ▼17.74
Media Library /wp-admin/upload.php3.27 ▲0.0438.15 ▲2.55

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

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

Browser metrics Passed 4 tests

Simple User Meta Editor: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲2814.35 ▲0.012.02 ▲0.1946.06 ▲5.04
Dashboard /wp-admin2,198 ▲185.51 ▼0.1485.60 ▼3.0338.11 ▼10.97
Posts /wp-admin/edit.php2,100 ▼02.04 ▲0.0337.31 ▼3.7230.77 ▼9.56
Add New Post /wp-admin/post-new.php1,526 ▼023.28 ▼0.21674.89 ▼25.2560.96 ▼3.81
Media Library /wp-admin/upload.php1,400 ▲34.17 ▲0.0193.80 ▼5.9042.49 ▼2.41

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
Please fix the following items
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      Use of undefined constant ME_ANJAN_SUME_URL - assumed 'ME_ANJAN_SUME_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/simple-user-meta-editor/includes/templates/editor/index.php on line 7
    • > PHP Notice
      Undefined variable: user in wp-content/plugins/simple-user-meta-editor/includes/templates/editor/index.php on line 6
    • > PHP Warning
      Use of undefined constant ME_ANJAN_SUME_URL - assumed 'ME_ANJAN_SUME_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/simple-user-meta-editor/includes/templates/editor/index.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/simple-user-meta-editor/index.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/simple-user-meta-editor/includes/templates/editor/index.php:11
    • > PHP Warning
      Use of undefined constant ME_ANJAN_SUME_URL - assumed 'ME_ANJAN_SUME_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/simple-user-meta-editor/includes/templates/editor/index.php on line 8
    • > PHP Notice
      Trying to get property 'user_login' of non-object in wp-content/plugins/simple-user-meta-editor/includes/templates/editor/index.php on line 6

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

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
2 plugin tags: editor, meta

simple-user-meta-editor/index.php 92% from 13 tests

The principal PHP file in "Simple User Meta Editor" v. 1.0.0 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("simple-user-meta-editor.php" instead of "index.php")

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 plugin892 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP9231180397
SVG100288
JavaScript39217159
Sass29044
CSS40104

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity6.57
▷ Minimum class complexity1.00
▷ Maximum class complexity26.00
Average method complexity3.17
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods18
▷ Static methods844.44%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
2 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png22.54KB10.09KB▼ 55.24%
assets/screenshot-2.png35.69KB15.30KB▼ 57.12%