84% woo-postnumre

Code Review | Checkout Postnumre

WordPress plugin Checkout Postnumre scored84%from 54 tests.

About plugin

  • Plugin page: woo-postnumre
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-6.1
  • WordPress version: 6.3.1
  • First release: May 18, 2022
  • Latest release: Oct 26, 2022
  • Number of updates: 8
  • Update frequency: every 159.4 days
  • Top authors: patrickthagaard (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,284 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼2.32ms] Passed 4 tests

A check of server-side resources used by Checkout Postnumre
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0037.76 ▼3.23
Dashboard /wp-admin3.31 ▲0.0145.43 ▼2.90
Posts /wp-admin/edit.php3.36 ▲0.0047.50 ▲2.85
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.19 ▼4.25
Media Library /wp-admin/upload.php3.23 ▲0.0032.76 ▲1.11

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checkout Postnumre: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.59 ▼0.721.70 ▼0.1143.12 ▲2.82
Dashboard /wp-admin2,206 ▲155.84 ▲0.97100.43 ▼4.6840.64 ▼7.82
Posts /wp-admin/edit.php2,089 ▼01.97 ▼0.0738.92 ▲4.6036.29 ▲2.32
Add New Post /wp-admin/post-new.php1,533 ▲1923.17 ▲5.62586.89 ▼9.0566.69 ▲13.66
Media Library /wp-admin/upload.php1,388 ▼34.33 ▲0.1497.21 ▼3.0543.10 ▼0.73

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

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 everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-postnumre/checkout-postnumre.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: dansk, woocommerce, postnummer, checkout

woo-postnumre/checkout-postnumre.php 85% from 13 tests

The main PHP file in "Checkout Postnumre" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("woo-postnumre.php" instead of "checkout-postnumre.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 plugin33 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP161333

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions1
▷ Named functions1100.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
PNG images were not found in this plugin