83% custom-meta-widget

Code Review | Custom Meta Widget

WordPress plugin Custom Meta Widget scored83%from 54 tests.

About plugin

  • Plugin page: custom-meta-widget
  • Plugin version: 1.5.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.9.4
  • WordPress version: 6.3.1
  • First release: Dec 6, 2011
  • Latest release: Feb 9, 2018
  • Number of updates: 123
  • Update frequency: every 18.4 days
  • Top authors: bitacre (100%)

Code review

54 tests

User reviews

23 reviews

Install metrics

10,000+ active /215,368 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
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼12.42ms] Passed 4 tests

Analyzing server-side resources used by Custom Meta Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.32 ▲2.29
Dashboard /wp-admin3.33 ▼0.0246.65 ▼17.32
Posts /wp-admin/edit.php3.44 ▲0.0950.31 ▼3.12
Add New Post /wp-admin/post-new.php5.91 ▲0.0284.12 ▼29.74
Media Library /wp-admin/upload.php3.25 ▲0.0235.52 ▲0.50

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 40 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_custommetawidget

Browser metrics Passed 4 tests

Custom Meta Widget: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6913.71 ▼0.521.75 ▼0.2241.24 ▲1.26
Dashboard /wp-admin2,224 ▲185.86 ▲0.98105.32 ▲2.8636.59 ▼8.75
Posts /wp-admin/edit.php2,100 ▼02.14 ▲0.0938.77 ▼3.3535.33 ▼1.70
Add New Post /wp-admin/post-new.php1,549 ▲823.33 ▲5.04646.03 ▲30.1255.66 ▼0.95
Media Library /wp-admin/upload.php1,394 ▼64.23 ▲0.05101.28 ▲2.9140.11 ▼1.35

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-posts
    • db_upgraded
    • widget_custommetawidget
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/custom-meta-widget/customMeta.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
  • Screenshots: These screenshots do not have images: #1 (The widget's options page on the Appearance > Widgets menu.), #2 (The widget displayed on the sidebar with 3 links hidden and a custom link added.), #3 (Comparison of options between the standard and Custom Meta Widget.)
The official readme.txt might help

custom-meta-widget/customMeta.php 92% from 13 tests

"Custom Meta Widget" version 1.5.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("custom-meta-widget.php" instead of "customMeta.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected1,407 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PO File174378741,273
PHP15276134

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity28.00
▷ Minimum class complexity28.00
▷ Maximum class complexity28.00
Average method complexity4.86
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.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
3 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png26.35KB8.78KB▼ 66.68%
screenshot-2.png3.11KB1.90KB▼ 38.88%
screenshot-1.png21.24KB7.21KB▼ 66.06%