84% meta-shortcode

Code Review | Meta Shortcode

WordPress plugin Meta Shortcode scored84%from 54 tests.

About plugin

  • Plugin page: meta-shortcode
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5-3.4.2
  • WordPress version: 6.3.1
  • First release: Nov 3, 2012
  • Latest release: Nov 4, 2012
  • Number of updates: 10
  • Update frequency: every 0.3 days
  • Top authors: RyanNutt (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,361 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
Install script ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼9.34ms] Passed 4 tests

A check of server-side resources used by Meta Shortcode
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.06 ▼5.30
Dashboard /wp-admin3.32 ▼0.0350.51 ▼11.57
Posts /wp-admin/edit.php3.37 ▲0.0151.23 ▼1.75
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.23 ▼17.99
Media Library /wp-admin/upload.php3.24 ▲0.0033.11 ▼2.51

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Meta Shortcode
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.27 ▼0.291.85 ▼0.2744.53 ▲4.30
Dashboard /wp-admin2,195 ▲275.63 ▲0.0486.87 ▼11.5439.04 ▲0.80
Posts /wp-admin/edit.php2,100 ▼32.03 ▲0.0338.08 ▼2.7936.93 ▲0.72
Add New Post /wp-admin/post-new.php1,526 ▼023.03 ▼0.62707.19 ▲30.5760.54 ▲6.36
Media Library /wp-admin/upload.php1,403 ▲64.23 ▲0.1097.97 ▲1.4744.34 ▲3.10

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/meta-shortcode/meta-shortcode.php:53

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: page, post, meta

meta-shortcode/meta-shortcode.php Passed 13 tests

The principal PHP file in "Meta Shortcode" v. 0.1 is loaded by WordPress automatically on each request
75 characters long description:
Add a metafield shortcode to easily insert meta values into a post or page.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin39 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP17939

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity8.00
▷ Minimum method complexity8.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods1
▷ Static methods00.00%
▷ Public methods1100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin