72% nuapay-emandates

Code Review | NUAPAY WordPress Plugin

WordPress plugin NUAPAY WordPress Plugin scored72%from 54 tests.

About plugin

  • Plugin page: nuapay-emandates
  • Plugin version: 1.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.0
  • WordPress version: 6.3.1
  • First release: Dec 24, 2015
  • Latest release: Oct 25, 2022
  • Number of updates: 69
  • Update frequency: every 36.2 days
  • Top authors: nuapay-wordpress (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,810 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

Server-side resources used by NUAPAY WordPress Plugin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.66 ▼7.08
Dashboard /wp-admin3.32 ▲0.0144.12 ▼2.02
Posts /wp-admin/edit.php3.37 ▲0.0145.56 ▼3.17
Add New Post /wp-admin/post-new.php5.90 ▲0.0193.09 ▼11.51
Media Library /wp-admin/upload.php3.24 ▲0.0135.05 ▼3.41
NUAPAY Options /wp-admin/options-general.php?page=np_menu_slug3.2429.79

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by NUAPAY WordPress Plugin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.27 ▼1.031.78 ▼0.1041.70 ▼4.79
Dashboard /wp-admin2,210 ▲195.86 ▲0.9399.56 ▼9.9440.20 ▼2.17
Posts /wp-admin/edit.php2,093 ▲41.96 ▼0.0439.67 ▼0.5135.81 ▼0.11
Add New Post /wp-admin/post-new.php1,536 ▲223.04 ▼0.03661.51 ▼4.8962.98 ▲8.63
Media Library /wp-admin/upload.php1,386 ▼24.23 ▲0.0297.92 ▼8.3444.08 ▼3.09
NUAPAY Options /wp-admin/options-general.php?page=np_menu_slug8142.0523.4525.99

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
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=np_menu_slug
    • > Notice in wp-content/plugins/nuapay-emandates/views/admin.php+13
    Trying to access array offset on value of type bool

SRP 0% 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
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/nuapay-emandates/views/error.php
  • 10× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'NPUtils' not found in wp-content/plugins/nuapay-emandates/views/admin.php:2
    • > PHP Notice
      Undefined variable: message in wp-content/plugins/nuapay-emandates/views/error.php on line 1
    • > PHP Notice
      Undefined variable: url in wp-content/plugins/nuapay-emandates/views/index.redirect.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/nuapay-emandates/nuapay-plugin.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'NPUtils' not found in wp-content/plugins/nuapay-emandates/views/index.overlay.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'NuapayEmandatesShortcode' not found in wp-content/plugins/nuapay-emandates/shortcode/nuapay-emandate-shortcode.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'NuapayAispShortcode' not found in wp-content/plugins/nuapay-emandates/shortcode/nuapay-aisp-shortcode.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'NuapayPispShortcode' not found in wp-content/plugins/nuapay-emandates/shortcode/nuapay-pisp-shortcode.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'NPUtils' not found in wp-content/plugins/nuapay-emandates/views/index.redirect.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/nuapay-emandates/shortcode/shortcode.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === nuapay-emandates === )
The official readme.txt might help

nuapay-emandates/nuapay-plugin.php 92% from 13 tests

"NUAPAY WordPress Plugin" version 1.0.8's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("nuapay-emandates.php" instead of "nuapay-plugin.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
Good job! No executable or dangerous file extensions detected910 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP1513051621
JavaScript2473232
CSS10057

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity6.17
▷ Minimum class complexity1.00
▷ Maximum class complexity11.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods31
▷ Static methods929.03%
▷ Public methods1548.39%
▷ Protected methods1135.48%
▷ Private methods516.13%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants16
▷ Global constants425.00%
▷ Class constants1275.00%
▷ Public constants12100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
media/nuapay.png9.28KB5.86KB▼ 36.82%
media/icon.png0.51KB0.57KB0.00%