79% wp-profitshare-advertisers

Code Review | WP Profitshare Advertisers

WordPress plugin WP Profitshare Advertisers scored79%from 54 tests.

About plugin

  • Plugin page: wp-profitshare-ad...
  • Plugin version: 1.3.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.1
  • WordPress version: 6.3.1
  • First release: Feb 27, 2019
  • Latest release: Dec 12, 2022
  • Number of updates: 48
  • Update frequency: every 28.9 days
  • Top authors: Profitshare (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /2,299 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

This is a short check of server-side resources used by WP Profitshare Advertisers
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.89 ▼3.23
Dashboard /wp-admin3.31 ▲0.0050.19 ▼1.36
Posts /wp-admin/edit.php3.36 ▲0.0043.13 ▼1.89
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.15 ▼19.41
Media Library /wp-admin/upload.php3.23 ▲0.0032.50 ▲2.07

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Profitshare Advertisers
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲6813.27 ▼1.294.46 ▲2.4240.87 ▼7.18
Dashboard /wp-admin2,206 ▲185.91 ▲0.80102.19 ▼14.2339.32 ▼4.74
Posts /wp-admin/edit.php2,089 ▼31.99 ▲0.0034.36 ▼2.3835.77 ▲3.00
Add New Post /wp-admin/post-new.php1,514 ▼717.60 ▼5.63671.10 ▼10.5954.41 ▲3.51
Media Library /wp-admin/upload.php1,388 ▲64.21 ▼0.0196.93 ▼3.2044.16 ▲2.91

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 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
Please fix the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wp-profitshare-advertisers/includes/templates/pwa_categories_template.php
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/wp-profitshare-advertisers/includes/controllers/class-PWA-plugin.php:62
    • > PHP Fatal error
      Uncaught Error: Class 'PWA_Validator' not found in wp-content/plugins/wp-profitshare-advertisers/includes/validators/validator-PWA-wordpress-category.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'PWA_Model' not found in wp-content/plugins/wp-profitshare-advertisers/includes/models/model-PWA-wordpress-categories.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'PWA_Model' not found in wp-content/plugins/wp-profitshare-advertisers/includes/models/model-PWA-categories.php:3

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

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: affiliates, conversie, marketing afiliat, advertisers, advertiseri...

wp-profitshare-advertisers/wp-profitshare-advertisers.php Passed 13 tests

"WP Profitshare Advertisers" version 1.3.6's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
44 characters long description:
Profitshare module for wordpress woocommerce

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
No dangerous file extensions were detected1,642 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP143333271,313
CSS2420210
JavaScript22410119

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity13.50
▷ Minimum class complexity4.00
▷ Maximum class complexity80.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes216.67%
▷ Concrete classes1083.33%
▷ Final classes00.00%
Methods91
▷ Static methods00.00%
▷ Public methods7582.42%
▷ Protected methods00.00%
▷ Private methods1617.58%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants29
▷ Global constants13.45%
▷ Class constants2896.55%
▷ Public constants28100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.14MB with 0.06MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png47.61KB27.18KB▼ 42.91%
screenshot-1.png46.92KB25.71KB▼ 45.20%
screenshot-3.png46.91KB25.62KB▼ 45.38%