72% post-meta

Code Review | Post Meta

WordPress plugin Post Meta scored72%from 54 tests.

About plugin

  • Plugin page: post-meta
  • Plugin version: 1.0.9
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.2.4
  • WordPress version: 6.3.1
  • First release: Sep 12, 2012
  • Latest release: Oct 11, 2015
  • Number of updates: 194
  • Update frequency: every 5.8 days
  • Top authors: mahbubur39 (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

100+ active /15,457 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼0.34MB] [CPU: ▼20.09ms] Passed 4 tests

A check of server-side resources used by Post Meta
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.97 ▲0.5149.29 ▲6.40
Dashboard /wp-admin3.57 ▲0.2732.35 ▼18.20
Posts /wp-admin/edit.php3.64 ▲0.2937.87 ▼7.86
Add New Post /wp-admin/post-new.php3.60 ▼2.2838.26 ▼52.27
Media Library /wp-admin/upload.php3.59 ▲0.3633.38 ▼2.02
Post Types /wp-admin/admin.php?page=manage-post-types3.5528.31
Settings /wp-admin/admin.php?page=post-meta-settings3.5528.60
Post Meta /wp-admin/admin.php?page=post-meta3.5528.87
Taxonomies /wp-admin/admin.php?page=manage-taxonomies3.5529.57

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 90 new files
Database: no new tables, 7 new options
New WordPress options
pm_settings
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Post Meta
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲10414.44 ▲0.061.76 ▼0.2043.04 ▼5.71
Dashboard /wp-admin2,244 ▲594.91 ▼0.94100.25 ▼19.0984.32 ▲41.60
Posts /wp-admin/edit.php2,138 ▲492.39 ▲0.3952.20 ▲16.0735.11 ▼2.93
Add New Post /wp-admin/post-new.php1,578 ▲4518.39 ▼5.00620.16 ▼71.5057.98 ▲5.26
Media Library /wp-admin/upload.php1,417 ▲294.25 ▲0.0897.89 ▼11.1476.25 ▲31.03
Post Types /wp-admin/admin.php?page=manage-post-types1,5392.0739.1469.57
Settings /wp-admin/admin.php?page=post-meta-settings1,4791.9333.1256.28
Post Meta /wp-admin/admin.php?page=post-meta1,1372.1731.4239.09
Taxonomies /wp-admin/admin.php?page=manage-taxonomies1,4592.0533.6144.10

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=manage-taxonomies
    • > Notice in wp-content/plugins/post-meta/lib/controllers/pmPostController.php+49
    Undefined index: post_type
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=manage-taxonomies
    • > Notice in wp-content/plugins/post-meta/lib/views/taxonomy/taxonomy.php+39
    Undefined variable: data
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=manage-taxonomies
    • > Notice in wp-content/plugins/post-meta/lib/views/taxonomy/taxonomy.php+39
    Trying to access array offset on value of type null
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=manage-post-types
    • > Notice in wp-content/plugins/post-meta/lib/views/posttype/postTypeAdvOptions.php+144
    Undefined variable: field
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=manage-taxonomies
    • > Notice in wp-content/plugins/post-meta/lib/init.php(44) : eval()'d code+61
    Undefined variable: html
    • > GET request to /wp-admin/admin.php?page=post-meta-settings
    • > Notice in wp-content/plugins/post-meta/lib/views/setting/settingFile.php+46
    Undefined index: max_file_size_custom
    • > GET request to /wp-admin/admin.php?page=manage-taxonomies
    • > Notice in wp-content/plugins/post-meta/lib/views/taxonomy/taxonomyAdvOptions.php+60
    Undefined variable: object_type

SRP 0% 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 items
  • 5× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/post-meta/lib/helpers/uploader/uploader.php
    • > /wp-content/plugins/post-meta/lib/helpers/tinymce/window.php
    • > /wp-content/plugins/post-meta/lib/init.php
    • > /wp-content/plugins/post-meta/post-meta.php
    • > /wp-content/plugins/post-meta/lib/models/enc/pmProInitModel.php
  • 51× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Undefined index: options in wp-content/plugins/post-meta/lib/views/postField.php on line 107
    • > PHP Notice
      Undefined variable: field in wp-content/plugins/post-meta/lib/views/postField.php on line 31
    • > PHP Notice
      Undefined variable: post_type in wp-content/plugins/post-meta/lib/views/postmeta/manageForm.php on line 5
    • > PHP Notice
      Undefined variable: content in wp-content/plugins/post-meta/lib/views/metaBox.php on line 14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/post-meta/lib/views/postmeta/manageForm.php:19
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/post-meta/lib/views/postField.php on line 28
    • > PHP Notice
      Undefined variable: field in wp-content/plugins/post-meta/lib/views/postField.php on line 25
    • > PHP Notice
      Undefined index: width in wp-content/plugins/post-meta/lib/views/postField.php on line 49
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/post-meta/lib/views/taxonomy/mamageTaxonomies.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/post-meta/lib/views/setting/settings.php:3

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

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Tags: You are using too many tags: 24 tag instead of maximum 10
The official readme.txt might help

post-meta/post-meta.php 92% from 13 tests

Analyzing the main PHP file in "Post Meta" version 1.0.9
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 210 characters long)

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 detected11,033 lines of code in 63 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript158011,3826,124
PHP439241964,406
CSS58829503

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity21.00
▷ Minimum class complexity1.00
▷ Maximum class complexity87.00
Average method complexity4.60
▷ Minimum method complexity1.00
▷ Maximum method complexity63.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes20
▷ Abstract classes00.00%
▷ Concrete classes20100.00%
▷ Final classes00.00%
Methods111
▷ Static methods00.00%
▷ Public methods10998.20%
▷ Protected methods00.00%
▷ Private methods21.80%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
21 PNG files occupy 0.59MB with 0.31MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon32.png4.53KB1.58KB▼ 65.19%
assets/images/remove_duplicate.png1.24KB0.42KB▼ 65.80%
screenshot-1.png86.38KB41.74KB▼ 51.68%
assets/images/edit_icon.png0.73KB0.69KB▼ 4.96%
assets/images/donate-button.png16.23KB4.55KB▼ 71.95%