67% topup-africa-widget

Code Review | TopUp

WordPress plugin TopUp scored67%from 54 tests.

About plugin

  • Plugin page: topup-africa-widget
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.5
  • WordPress version: 6.3.1
  • First release: Jul 13, 2016
  • Latest release: Jul 14, 2016
  • Number of updates: 3
  • Update frequency: every 1.0 days
  • Top authors: topupafrica (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,634 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.94MB] [CPU: ▼37.83ms] Passed 4 tests

An overview of server-side resources used by TopUp
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.02292.72 ▲255.87
Dashboard /wp-admin3.01 ▼0.3422.61 ▼36.11
Posts /wp-admin/edit.php3.01 ▼0.3523.84 ▼24.23
Add New Post /wp-admin/post-new.php3.01 ▼2.8822.63 ▼76.04
Media Library /wp-admin/upload.php3.01 ▼0.2220.15 ▼14.93
TopUp Widget /wp-admin/options-general.php?page=topup-africa-widget/topupwidget.php3.0221.80

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for TopUp
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲4913.66 ▼0.644.54 ▲2.6939.31 ▼3.12
Dashboard /wp-admin2,204 ▲255.83 ▼0.0697.39 ▼10.3738.94 ▼9.23
Posts /wp-admin/edit.php2,090 ▲12.00 ▼0.0139.55 ▼0.7234.25 ▼1.38
Add New Post /wp-admin/post-new.php1,536 ▲323.18 ▲0.14655.48 ▲1.3159.85 ▲9.71
Media Library /wp-admin/upload.php1,392 ▲14.30 ▼0.0296.35 ▼6.0143.28 ▼3.56
TopUp Widget /wp-admin/options-general.php?page=topup-africa-widget/topupwidget.php8002.0323.4427.58

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=topup-africa-widget/topupwidget.php
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.

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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/topup-africa-widget/topupwidget.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Screenshots: Please add descriptions for these screenshots #1, #2 in topup-africa-widget/assets to your readme.txt
  • Tags: Please delete some tags, you are using 22 tag instead of maximum 10
The official readme.txt is a good inspiration

topup-africa-widget/topupwidget.php 85% from 13 tests

"TopUp" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("topup-africa-widget.php" instead of "topupwidget.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 615 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin100 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP162099
JSON1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin