94% 7k-image-uploader-meta-box

Code Review | 7K Image Uploader Meta Box

WordPress plugin 7K Image Uploader Meta Box scored 94% from 54 tests.

About plugin

  • Plugin page: 7k-image-uploader...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.8
  • WordPress version: 5.8.1
  • First release: Feb 9, 2014
  • Latest release: Feb 9, 2014
  • Number of updates: 16
  • Update frequency: N/A
  • Top authors: kharisblank (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,529 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.01MB] [CPU: ▼140.09ms] Passed 4 tests

This is a short check of server-side resources used by 7K Image Uploader Meta Box
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1333.57 ▲12.02
Dashboard /wp-admin3.08 ▲0.0242.90 ▼1.72
Posts /wp-admin/edit.php3.13 ▲0.0241.40 ▼0.33
Add New Post /wp-admin/post-new.php5.44 ▼0.0086.56 ▼559.80
Media Library /wp-admin/upload.php3.02 ▲0.0131.94 ▲1.51

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by 7K Image Uploader Meta Box
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,692 ▲9615.92 ▼0.228.43 ▼2.2845.79 ▼5.37
Dashboard /wp-admin2,970 ▲365.93 ▼0.23151.82 ▲12.84111.00 ▼5.59
Posts /wp-admin/edit.php2,743 ▲42.74 ▲0.0361.36 ▼0.4395.18 ▲8.17
Add New Post /wp-admin/post-new.php1,677 ▲17721.85 ▲3.12273.65 ▼103.82113.17 ▼2.86
Media Library /wp-admin/upload.php1,813 ▲65.03 ▲0.04138.79 ▼18.74117.07 ▼1.46

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstaller ran successfully

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/7k-image-uploader-meta-box/7k-image-uploader-meta-box.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Contributors: Plugin contributors not specified
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Uploader field), #2 (WordPress media uploader), #3 (Image uploaded), #4 (Image selected)
The official readme.txt might help

7k-image-uploader-meta-box/7k-image-uploader-meta-box.php Passed 13 tests

"7K Image Uploader Meta Box" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
53 characters long description:
Simple WordPress plugin adds image uploader meta box.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin159 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP16615159

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.75
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
4 PNG files occupy 0.17MB with 0.09MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png2.44KB1.69KB▼ 30.80%
screenshot-3.png124.18KB34.42KB▼ 72.28%
screenshot-2.png12.31KB6.90KB▼ 43.95%
screenshot-4.png38.10KB15.52KB▼ 59.25%