83% xps-ship-integration

Code Review | XPS Ship Integration

WordPress plugin XPS Ship Integration scored83%from 54 tests.

About plugin

  • Plugin page: xps-ship-integration
  • Plugin version: 1.1.73
  • PHP version: 7.4.16
  • WordPress compatibility: 2.4.8-6.3.1
  • WordPress version: 6.3.1
  • First release: May 20, 2020
  • Latest release: Oct 10, 2023
  • Number of updates: 37
  • Update frequency: every 33.5 days
  • Top authors: xpsship (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

1,000+ active /16,165 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
Install script ran successfully

Server metrics [RAM: ▲0.31MB] [CPU: ▼1.00ms] Passed 4 tests

This is a short check of server-side resources used by XPS Ship Integration
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.78 ▲0.3150.45 ▲9.85
Dashboard /wp-admin3.61 ▲0.3147.66 ▼1.89
Posts /wp-admin/edit.php3.72 ▲0.3751.43 ▼2.28
Add New Post /wp-admin/post-new.php6.19 ▲0.3197.69 ▼4.58
Media Library /wp-admin/upload.php3.53 ▲0.3137.93 ▲4.76

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for XPS Ship Integration
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲3614.73 ▲0.081.78 ▼0.1444.22 ▲2.73
Dashboard /wp-admin2,203 ▲265.57 ▲0.0194.91 ▲5.3343.69 ▼4.27
Posts /wp-admin/edit.php2,108 ▲112.00 ▲0.0240.68 ▲2.4537.75 ▲0.49
Add New Post /wp-admin/post-new.php1,534 ▼1517.61 ▼5.84690.38 ▲18.3376.48 ▲22.39
Media Library /wp-admin/upload.php1,411 ▲144.24 ▲0.01106.18 ▲1.3045.51 ▼1.47

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/xps-ship-integration/xpsship-integration.php on line 12
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/xps-ship-integration/xpsship-integration.php on line 12
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/xps-ship-integration/xpsship-integration.php on line 12

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)
No browser issues were found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3 in xps-ship-integration/assets to your readme.txt
  • Tags: Please delete some tags, you are using 14 tag instead of maximum 10
The official readme.txt is a good inspiration

xps-ship-integration/xpsship-integration.php 77% from 13 tests

Analyzing the main PHP file in "XPS Ship Integration" version 1.1.73
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 155 characters long)
  • Requires at least: Required version must be the same as the one declared in readme.txt ("2.6" instead of "2.4.8")
  • Main file name: The principal plugin file should be the same as the plugin slug ("xps-ship-integration.php" instead of "xpsship-integration.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected1,508 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP23331511,508

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity37.00
▷ Minimum class complexity14.00
▷ Maximum class complexity63.00
Average method complexity5.70
▷ Minimum method complexity1.00
▷ Maximum method complexity52.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods31
▷ Static methods26.45%
▷ Public methods31100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions1173.33%
▷ Anonymous functions426.67%
Constants23
▷ Global constants313.04%
▷ Class constants2086.96%
▷ Public constants20100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin