89% nextbestoffer-ols

Code Review | NextBestOffer-OLS

WordPress plugin NextBestOffer-OLS scored89%from 54 tests.

About plugin

  • Plugin page: nextbestoffer-ols
  • Plugin version: 1.2.1
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1-6.3
  • WordPress version: 6.3.1
  • First release: Oct 13, 2023
  • Latest release: Oct 31, 2023
  • Number of updates: 15
  • Update frequency: every 1.3 days
  • Top authors: openlogicsystems (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /98 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.05MB] [CPU: ▼0.42ms] Passed 4 tests

Analyzing server-side resources used by NextBestOffer-OLS
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0441.21 ▲2.11
Dashboard /wp-admin3.35 ▲0.0549.12 ▲3.27
Posts /wp-admin/edit.php3.41 ▲0.0543.00 ▼5.41
Add New Post /wp-admin/post-new.php5.95 ▲0.0791.93 ▼1.20
Media Library /wp-admin/upload.php3.28 ▲0.0535.78 ▲2.83
NextBestOffer Plugin /wp-admin/options-general.php?page=NextBestOffer_OLS_options3.3429.95
Training Confirmation /wp-admin/admin.php?page=nextbestoffer_ols_confirmation3.2731.38

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 29 new files
Database: no new tables, 15 new options
New WordPress options
NextBestOffer_OLS_min_support
NextBestOffer_OLS_api_key
theysaidso_admin_options
NextBestOffer_OLS_selected_partial
db_upgraded
NextBestOffer_OLS_logs
NextBestOffer_OLS_training_mode
NextBestOffer_OLS_use_case
NextBestOffer_OLS_min_confidence
can_compress_scripts
...

Browser metrics Passed 4 tests

An overview of browser requirements for NextBestOffer-OLS
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,880 ▲11913.44 ▼0.938.35 ▲6.6242.70 ▲2.76
Dashboard /wp-admin2,206 ▲325.59 ▼0.0184.30 ▼7.1940.35 ▼4.55
Posts /wp-admin/edit.php2,108 ▲82.02 ▲0.0735.60 ▲0.9936.16 ▲1.45
Add New Post /wp-admin/post-new.php1,542 ▲1618.34 ▼4.61610.27 ▼54.0367.55 ▲11.52
Media Library /wp-admin/upload.php1,405 ▲54.15 ▼0.2697.99 ▼6.7640.15 ▼3.86
NextBestOffer Plugin /wp-admin/options-general.php?page=NextBestOffer_OLS_options8532.0524.0027.23
Training Confirmation /wp-admin/admin.php?page=nextbestoffer_ols_confirmation7882.0423.4828.59

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 15 options
    • widget_recent-posts
    • NextBestOffer_OLS_min_support
    • NextBestOffer_OLS_selected_partial
    • NextBestOffer_OLS_training_mode
    • NextBestOffer_OLS_batch_size
    • NextBestOffer_OLS_min_confidence
    • db_upgraded
    • NextBestOffer_OLS_api_key
    • theysaidso_admin_options
    • NextBestOffer_OLS_logs
    • ...

Smoke tests Passed 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)
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The SRP test was a success

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: post-purchase suggestions, woocommerce extension, ai-powered, cross-selling, product recommendations

nextbestoffer-ols/NextBestOffer-OLS.php 85% from 13 tests

The main PHP file in "NextBestOffer-OLS" ver. 1.2.1 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("nextbestoffer-ols.php" instead of "NextBestOffer-OLS.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 155 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected1,247 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP16284609985
PO File16278205
CSS27646
JavaScript242811

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity15.00
▷ Minimum class complexity1.00
▷ Maximum class complexity53.00
Average method complexity3.11
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods53
▷ Static methods1018.87%
▷ Public methods4279.25%
▷ Protected methods00.00%
▷ Private methods1120.75%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin