84% unicef-tap-project-banner

Code Review | UNICEF Tap Project Banner

WordPress plugin UNICEF Tap Project Banner scored84%from 54 tests.

About plugin

  • Plugin page: unicef-tap-projec...
  • Plugin version: 0.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-3.9.2
  • WordPress version: 6.3.1
  • First release: Sep 2, 2014
  • Latest release: Sep 2, 2014
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: adamcarter (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,011 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼2.74ms] Passed 4 tests

A check of server-side resources used by UNICEF Tap Project Banner
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0543.59 ▼0.74
Dashboard /wp-admin3.35 ▲0.0449.59 ▼1.83
Posts /wp-admin/edit.php3.40 ▲0.0450.50 ▼2.31
Add New Post /wp-admin/post-new.php5.93 ▲0.0493.73 ▼6.06
Media Library /wp-admin/upload.php3.27 ▲0.0440.51 ▲3.53
UNICEF Tap Project Banner /wp-admin/options-general.php?page=unicef-tap-project-banner3.2433.74

Server storage [IO: ▲0.50MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
Please fix the following
  • Illegal file modification found: 1 file (4.00KB) outside of "wp-content/plugins/unicef-tap-project-banner/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for UNICEF Tap Project Banner
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,836 ▲7513.26 ▼1.011.76 ▼0.1062.55 ▲14.97
Dashboard /wp-admin2,225 ▲224.81 ▼0.30102.95 ▼17.0740.47 ▼2.74
Posts /wp-admin/edit.php2,104 ▲42.03 ▲0.0140.32 ▲2.2837.12 ▲3.26
Add New Post /wp-admin/post-new.php1,529 ▼1117.64 ▼0.45585.17 ▼77.0667.03 ▲1.71
Media Library /wp-admin/upload.php1,407 ▲44.24 ▲0.0096.61 ▼4.6045.20 ▼2.27
UNICEF Tap Project Banner /wp-admin/options-general.php?page=unicef-tap-project-banner8991.7934.2735.76

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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 take a closer look at the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/unicef-tap-project-banner/unicef-tap-project-banner.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/unicef-tap-project-banner/banner.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: donate, clean water, charity, unicef, donations

unicef-tap-project-banner/unicef-tap-project-banner.php 92% from 13 tests

The main PHP file in "UNICEF Tap Project Banner" ver. 0.1.0 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 173 characters long)

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
Success! There were no dangerous files found in this plugin785 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP46793467
Bourne Again Shell24419193
Markdown335076
YAML26043
XML1306

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity20.00
▷ Minimum class complexity12.00
▷ Maximum class complexity28.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods15
▷ Static methods1280.00%
▷ Public methods1493.33%
▷ Protected methods00.00%
▷ Private methods16.67%
Functions4
▷ Named functions00.00%
▷ Anonymous functions4100.00%
Constants6
▷ Global constants583.33%
▷ Class constants116.67%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.18MB with 0.13MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/unicef-tap-project.png23.17KB7.73KB▼ 66.66%
assets/screenshot-3.png31.62KB8.43KB▼ 73.32%
assets/screenshot-2.png36.55KB10.18KB▼ 72.14%
assets/screenshot-1.png96.54KB30.13KB▼ 68.79%