83% nova-poshta-declarations

Code Review | Woo NovaPoshta. Электронная накладная

WordPress plugin Woo NovaPoshta. Электронная накладная scored83%from 54 tests.

About plugin

  • Plugin page: nova-poshta-decla...
  • Plugin version: 0.16
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Nov 8, 2016
  • Latest release: Feb 4, 2017
  • Number of updates: 37
  • Update frequency: every 2.4 days
  • Top authors: iytin (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,657 total downloads

Benchmarks

Plugin footprint 83% 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.01MB] [CPU: ▼2.85ms] Passed 4 tests

This is a short check of server-side resources used by Woo NovaPoshta. Электронная накладная
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.81 ▼5.02
Dashboard /wp-admin3.31 ▲0.0149.58 ▼1.54
Posts /wp-admin/edit.php3.36 ▲0.0150.90 ▼2.69
Add New Post /wp-admin/post-new.php5.89 ▲0.0194.02 ▼2.13
Media Library /wp-admin/upload.php3.23 ▲0.0137.93 ▲3.71

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Woo NovaPoshta. Электронная накладная
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.46 ▼0.121.73 ▼0.2737.80 ▼4.52
Dashboard /wp-admin2,203 ▲125.84 ▲0.94100.85 ▼1.5539.17 ▼8.41
Posts /wp-admin/edit.php2,089 ▼32.03 ▼0.0239.79 ▼0.7234.61 ▼2.48
Add New Post /wp-admin/post-new.php1,542 ▲918.52 ▼4.58613.48 ▼66.5154.10 ▲0.38
Media Library /wp-admin/upload.php1,382 ▼34.25 ▲0.0399.18 ▼7.8142.87 ▼4.92

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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 take a closer look at the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/nova-poshta-declarations/views/npen_template.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/nova-poshta-declarations/views/npen_metabox/npen_settigns_template.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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 need to be fixed:
  • Contributors: Plugin contributors field is missing
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === nova-poshta-declarations === )
The official readme.txt might help

nova-poshta-declarations/nova-poshta-declarations.php 92% from 13 tests

"Woo NovaPoshta. Электронная накладная" version 0.16'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:
  • Description: Please don't use more than 140 characters for the plugin description (currently 184 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin686 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
CSS1534436
PHP57145221
PO File1111926
JavaScript1003

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity12.00
▷ Minimum class complexity9.00
▷ Maximum class complexity15.00
Average method complexity2.29
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods17
▷ Static methods423.53%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
There were not PNG files found in your plugin