74% metabox-with-api

Code Review | Metabox with API

WordPress plugin Metabox with API scored74%from 54 tests.

About plugin

  • Plugin page: metabox-with-api
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-5.9
  • WordPress version: 6.3.1
  • First release: Jun 23, 2020
  • Latest release: Feb 4, 2022
  • Number of updates: 5
  • Update frequency: every 118.2 days
  • Top authors: saumil122 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /453 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Metabox with API
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0045.14 ▼6.70
Dashboard /wp-admin3.31 ▲0.0061.96 ▼5.72
Posts /wp-admin/edit.php3.36 ▲0.0062.26 ▲2.30
Add New Post /wp-admin/post-new.php5.89 ▲0.0095.04 ▼16.74
Media Library /wp-admin/upload.php3.23 ▲0.0042.22 ▲0.39

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Metabox with API
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.34 ▼0.012.20 ▲0.4942.87 ▼1.61
Dashboard /wp-admin2,192 ▲125.58 ▼0.0791.29 ▼9.2141.92 ▼1.24
Posts /wp-admin/edit.php2,103 ▲32.01 ▼0.0140.82 ▲2.1136.04 ▲1.52
Add New Post /wp-admin/post-new.php1,528 ▲223.02 ▼0.57696.10 ▲10.1351.98 ▼1.19
Media Library /wp-admin/upload.php1,403 ▲34.19 ▼0.00103.01 ▼3.1545.50 ▼0.52

Uninstaller [IO: ▲0.89MB] [DB: ▲0.00MB] 50% 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
  • Uninstaller has failed for this plugin, leaving 14 files (0.89MB) in the plugin directory
    • (new file) data/product.json
    • (new file) screenshot-3.png
    • (new file) screenshot-2.png
    • (new file) css/metaboxapi.css
    • (new file) screenshot-1.png
    • (new file) metabox-with-api.php
    • (new file) js/metaboxapi.js
    • (new file) data/category.json
    • (new file) LICENSE.txt
    • (new file) readme.txt
    • ...
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

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 everything seems fine, this is not an exhaustive test

SRP 50% 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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/metabox-with-api/metabox-with-api.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: custom metabox, data fetch, category api, data capture, product api...

metabox-with-api/metabox-with-api.php 92% from 13 tests

The primary PHP file in "Metabox with API" version 1.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 259 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected536 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP18678384
JSON20084
JavaScript14044
CSS14524

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity47.00
▷ Minimum class complexity47.00
▷ Maximum class complexity47.00
Average method complexity3.71
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods741.18%
▷ Public methods17100.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 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
7 PNG files occupy 0.85MB with 0.62MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-5.png156.83KB38.02KB▼ 75.75%
screenshot-1.png93.19KB26.69KB▼ 71.36%
screenshot-3.png154.39KB36.61KB▼ 76.29%
screenshot-2.png128.22KB38.32KB▼ 70.11%
screenshot-6.png163.35KB43.58KB▼ 73.32%