84% custom-metadata

Code Review | Custom Metadata Manager

WordPress plugin Custom Metadata Manager scored 84% from 54 tests.

About plugin

  • Plugin page: custom-metadata
  • Plugin version: 0.7.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.4.1
  • WordPress version: 6.3.1
  • First release: Oct 18, 2010
  • Latest release: Jul 11, 2012
  • Number of updates: 85
  • Update frequency: every 7.5 days
  • Top authors: batmoo (55.29%)jkudish (42.35%)stresslimit (3.53%)cvernon (2.35%)

Code review

54 tests

User reviews

5 reviews

Install metrics

700+ active / 14,486 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.15MB] [CPU: ▼3.40ms] Passed 4 tests

Server-side resources used by Custom Metadata Manager
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1439.00 ▼5.03
Dashboard /wp-admin3.44 ▲0.1447.52 ▼1.93
Posts /wp-admin/edit.php3.57 ▲0.2155.34 ▲7.53
Add New Post /wp-admin/post-new.php6.05 ▲0.1796.40 ▼9.11
Media Library /wp-admin/upload.php3.36 ▲0.1338.99 ▲2.48

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Custom Metadata Manager
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.32 ▼1.061.84 ▼0.0441.05 ▼6.65
Dashboard /wp-admin2,206 ▲184.87 ▼0.07108.15 ▲1.0340.71 ▼8.40
Posts /wp-admin/edit.php2,107 ▲182.25 ▲0.2339.30 ▲0.3635.77 ▲4.69
Add New Post /wp-admin/post-new.php1,538 ▼423.42 ▲5.20632.78 ▼15.8951.00 ▼5.23
Media Library /wp-admin/upload.php1,391 ▲64.24 ▲0.0595.93 ▼5.5643.14 ▼0.37

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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 | 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
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/custom-metadata/custom_metadata.php:84
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-metadata/custom_metadata_examples.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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 your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Write easy, intuitive and WordPress-like code to add new fields.), #2 (Custom Metadata Manager supports many field types with an easy way to render your own.), #3 (Adding custom columns is also easy. You can go with a default display, or specify your own output callback)
You can take inspiration from this readme.txt

custom-metadata/custom_metadata.php 92% from 13 tests

The entry point to "Custom Metadata Manager" version 0.7.1 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("custom-metadata.php" instead of "custom_metadata.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin1,264 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP2254181857
CSS23367293
JavaScript2516114

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity155.00
▷ Minimum class complexity155.00
▷ Maximum class complexity155.00
Average method complexity3.26
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods68
▷ Static methods00.00%
▷ Public methods68100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
15 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/ui-bg_glass_75_e6e6e6_1x400.png0.11KB0.14KB0.00%
css/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.10KB0.17KB0.00%
css/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%
css/images/calendar.png0.25KB0.28KB0.00%
css/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%