83% wizhi-banner-image

Code Review | Wizhi banner images

WordPress plugin Wizhi banner images scored 83% from 54 tests.

About plugin

  • Plugin page: wizhi-banner-image
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.4
  • WordPress version: 6.3.1
  • First release: Aug 7, 2014
  • Latest release: Jun 4, 2016
  • Number of updates: 9
  • Update frequency: every 198.0 days
  • Top authors: iwillhappy1314 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 943 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.77ms] Passed 4 tests

Server-side resources used by Wizhi banner images
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.35 ▼1.97
Dashboard /wp-admin3.32 ▲0.0246.24 ▼3.01
Posts /wp-admin/edit.php3.37 ▲0.0242.23 ▼7.31
Add New Post /wp-admin/post-new.php5.90 ▲0.0293.06 ▼6.79
Media Library /wp-admin/upload.php3.24 ▲0.0234.34 ▲1.20

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Wizhi banner images
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.21 ▼1.161.64 ▼0.2538.69 ▼4.64
Dashboard /wp-admin2,206 ▲175.79 ▲0.8298.36 ▼28.6939.39 ▲0.53
Posts /wp-admin/edit.php2,086 ▼62.01 ▼0.0035.86 ▼3.1534.15 ▼2.78
Add New Post /wp-admin/post-new.php1,538 ▲2423.32 ▲5.80604.31 ▼66.8445.21 ▼5.02
Media Library /wp-admin/upload.php1,385 ▼64.20 ▲0.0295.60 ▲1.2144.77 ▼0.63

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

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 fix the following items
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function piklist() in wp-content/plugins/wizhi-banner-image/parts/terms/fields-banner-images.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function piklist() in wp-content/plugins/wizhi-banner-image/parts/meta-boxes/field-page-tmp.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wizhi-banner-image/banner-images.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Donate link: Invalid URI ("")
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === wizhi-banner-image === )
You can look at the official readme.txt

wizhi-banner-image/banner-images.php 85% from 13 tests

"Wizhi banner images" version 1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wizhi-banner-image.php" instead of "banner-images.php")

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
Success! There were no dangerous files found in this plugin117 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP3374079
PO File221038

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
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%
Functions3
▷ Named functions3100.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
No PNG images were found in this plugin