73% simple-metadata

Code Review | Simple metadata

WordPress plugin Simple metadata scored 73% from 54 tests.

About plugin

  • Plugin page: simple-metadata
  • Plugin version: 1.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.3
  • WordPress version: 5.8.1
  • First release: Sep 4, 2018
  • Latest release: Jan 8, 2020
  • Number of updates: 44
  • Update frequency: every 11.2 days
  • Top authors: colomet (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 699 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▼0.27MB] [CPU: ▼167.59ms] Passed 4 tests

An overview of server-side resources used by Simple metadata
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.24 ▲0.4028.35 ▼7.02
Dashboard /wp-admin3.38 ▲0.3328.13 ▼19.15
Posts /wp-admin/edit.php3.38 ▲0.2826.95 ▼14.68
Add New Post /wp-admin/post-new.php3.38 ▼2.0525.22 ▼629.22
Media Library /wp-admin/upload.php3.38 ▲0.3827.14 ▼7.29
Organization /wp-admin/admin.php?page=smd_set_page_organization3.3827.08
Settings /wp-admin/admin.php?page=smd_set_page3.3828.55

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 71 new files
Database: no new tables, 2 new options
New WordPress options
smd_organization_logo_image_id
smd_website_blog_type

Browser metrics Passed 4 tests

Checking browser requirements for Simple metadata
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,941 ▲34517.52 ▲1.549.74 ▼1.2944.73 ▼0.26
Dashboard /wp-admin3,198 ▲2648.01 ▲2.01166.57 ▲1.54108.53 ▼10.71
Posts /wp-admin/edit.php3,253 ▲5144.66 ▲1.9491.62 ▲22.5682.73 ▼9.39
Add New Post /wp-admin/post-new.php3,694 ▲2,19615.38 ▼3.44463.96 ▲77.41104.16 ▼1.09
Media Library /wp-admin/upload.php1,845 ▲384.84 ▼0.19114.39 ▼36.74117.03 ▼3.83
Organization /wp-admin/admin.php?page=smd_set_page_organization1,4294.1886.1560.41
Settings /wp-admin/admin.php?page=smd_set_page1,5844.3387.2678.34

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
  • The plugin did not uninstall gracefully
    • > Warning in wp-includes/class-wp-hook.php+303
    call_user_func_array() expects parameter 1 to be a valid callback, function 'activation_warnings' not found or invalid function name

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=smd_set_page
    • > Warning in wp-includes/class-wp-hook.php+303
    call_user_func_array() expects parameter 1 to be a valid callback, function 'activation_warnings' not found or invalid function name

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 4× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/simple-metadata/smd-pages-related-content/smd-pages-related-content.php
    • > /wp-content/plugins/simple-metadata/network-admin/smd-network-admin.php
    • > /wp-content/plugins/simple-metadata/simple-metadata.php
    • > /wp-content/plugins/simple-metadata/smd-posts-related-content/smd-posts-related-content.php
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-metadata/admin/smd-site-cpt.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-metadata/smd-frontpage-related-content/smd-frontpage-related-content.php:105
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-metadata/admin/smd-set-page-metaboxes.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-metadata/symbionts/custom-metadata/custom_metadata.php:106
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-metadata/admin/smd-googleImage-box.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
8 plugin tags: simple metadata, metadata, pressbooks, structured data, schemaorg...

simple-metadata/simple-metadata.php Passed 13 tests

The primary PHP file in "Simple metadata" version 1.6 is used by WordPress to initiate all plugin functionality
94 characters long description:
This plugin provides auto-generated metadata on the basis of default WP web-pages information.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected4,717 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code
PHP136428072,645
CSS3150621,323
Markdown142620523
JavaScript65645226

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity241.00
▷ Minimum class complexity241.00
▷ Maximum class complexity241.00
Average method complexity4.04
▷ Minimum method complexity1.00
▷ Maximum method complexity71.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods79
▷ Static methods11.27%
▷ Public methods79100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions69
▷ Named functions6797.10%
▷ Anonymous functions22.90%
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
24 compressed PNG files occupy 0.30MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
doc/images/structured-data-site.png41.38KB45.53KB0.00%
symbionts/custom-metadata/css/images/ui-bg_glass_65_ffffff_1x400.png0.08KB0.10KB0.00%
symbionts/custom-metadata/css/select2.png0.51KB0.99KB0.00%
doc/images/settings-mu.png14.27KB15.39KB0.00%
doc/images/settings-post.png36.48KB39.49KB0.00%