64% hasoffers

Code Review | HasOffers

WordPress plugin HasOffers scored64%from 54 tests.

About plugin

  • Plugin page: hasoffers
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.0
  • WordPress version: 6.3.1
  • First release: Jun 23, 2016
  • Latest release: Jun 14, 2022
  • Number of updates: 10
  • Update frequency: every 218.5 days
  • Top authors: brainvireinfo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,125 total downloads

Benchmarks

Plugin footprint 48% 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 successfully, without throwing any errors or notices

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

A check of server-side resources used by HasOffers
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.49 ▼6.70
Dashboard /wp-admin3.32 ▼0.0351.97 ▼22.81
Posts /wp-admin/edit.php3.37 ▲0.0147.28 ▼1.86
Add New Post /wp-admin/post-new.php5.90 ▲0.0184.97 ▼8.67
Media Library /wp-admin/upload.php3.24 ▲0.0138.65 ▲1.56
HasOffers Settings /wp-admin/options-general.php?page=wpho-plugin-setting3.2134.54

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 8 new files
Database: 1 new table, 6 new options
New tables
wpho_mortgage
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

HasOffers: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲8113.25 ▼1.113.29 ▲1.5540.32 ▼2.84
Dashboard /wp-admin2,228 ▲224.87 ▼0.18101.58 ▼2.0440.44 ▼1.80
Posts /wp-admin/edit.php2,101 ▼22.02 ▼0.0233.63 ▼7.3335.82 ▼1.07
Add New Post /wp-admin/post-new.php1,534 ▲323.28 ▲0.14691.05 ▲5.0855.47 ▲0.34
Media Library /wp-admin/upload.php1,395 ▼54.21 ▲0.0395.85 ▼10.3146.83 ▲3.41
HasOffers Settings /wp-admin/options-general.php?page=wpho-plugin-setting8772.0324.6827.71

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/hasoffers/include/functions.php+70
    Undefined index: wpho_register_nonce
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wpho_mortgage
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

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 no errors were found, this is by no means 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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hasoffers/include/functions.php:2

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 Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: px api, affiliate marketing, hasoffers, px

hasoffers/hasoffers.php Passed 13 tests

This is the main PHP file of "HasOffers" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
130 characters long description:
HasOffers gives a thousands of businesses around the world and the ability to track and manage their own publisher relashionships.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin545 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP33111463
JavaScript33361
CSS10021

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.14
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin