79% revenue-generator

Code Review | Revenue Generator

WordPress plugin Revenue Generator scored79%from 54 tests.

About plugin

  • Plugin page: revenue-generator
  • Plugin version: 2.4.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.8
  • WordPress version: 6.3.1
  • First release: Jun 30, 2020
  • Latest release: Jul 15, 2021
  • Number of updates: 32
  • Update frequency: every 12.4 days
  • Top authors: laterpay (62.5%)milindmore22 (40.63%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,318 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲1.28MB] [CPU: ▲7.75ms] Passed 4 tests

Analyzing server-side resources used by Revenue Generator
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.71 ▲1.2552.63 ▲6.19
Dashboard /wp-admin4.58 ▲1.2860.85 ▲6.06
Posts /wp-admin/edit.php4.69 ▲1.3461.89 ▲13.03
Add New Post /wp-admin/post-new.php7.20 ▲1.3195.49 ▲5.71
Media Library /wp-admin/upload.php4.50 ▲1.2854.17 ▲18.50

Server storage [IO: ▲6.36MB] [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: 517 new files
Database: no new tables, 8 new options
New WordPress options
lp_rgv2_settings_options
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
lp_rgv2_global_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Revenue Generator
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲7713.66 ▼0.711.59 ▼0.1039.67 ▼2.31
Dashboard /wp-admin2,229 ▲385.86 ▲0.97103.57 ▼6.0438.61 ▼6.49
Posts /wp-admin/edit.php2,112 ▲201.99 ▲0.0039.66 ▲0.4634.99 ▼2.35
Add New Post /wp-admin/post-new.php1,526 ▼317.58 ▼0.75648.72 ▲14.8051.09 ▼5.23
Media Library /wp-admin/upload.php1,405 ▲174.21 ▼0.0296.94 ▼7.4646.03 ▼2.64

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/revenue-generator/v2/templates/frontend/contribution/amp-purchase-component.php
  • 68× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\MessageInterface' not found in wp-content/plugins/revenue-generator/vendor/psr/http-message/src/RequestInterface.php:24
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\MessageInterface' not found in wp-content/plugins/revenue-generator/vendor/psr/http-message/src/ResponseInterface.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'League\\OAuth2\\Client\\OptionProvider\\PostAuthOptionProvider' not found in wp-content/plugins/revenue-generator/vendor/league/oauth2-client/src/OptionProvider/HttpBasicAuthOptionProvider.php:23
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/revenue-generator/vendor/guzzlehttp/psr7/src/PumpStream.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/revenue-generator/vendor/guzzlehttp/psr7/src/Stream.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\TransferException' not found in wp-content/plugins/revenue-generator/vendor/guzzlehttp/guzzle/src/Exception/ConnectException.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/revenue-generator/vendor/guzzlehttp/psr7/src/InflateStream.php:20
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/revenue-generator/vendor/guzzlehttp/psr7/src/CachingStream.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Cookie\\CookieJar' not found in wp-content/plugins/revenue-generator/vendor/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\BadResponseException' not found in wp-content/plugins/revenue-generator/vendor/guzzlehttp/guzzle/src/Exception/ClientException.php:8

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: conversion, micropayment, contribution, monetization

revenue-generator/revenue-generator.php Passed 13 tests

The main file in "Revenue Generator" v. 2.4.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
58 characters long description:
Monetize your blog and content with the Revenue Generator.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected39,783 lines of code in 391 files:
LanguageFilesBlank linesComment linesLines of code
PHP2274,89211,42121,219
JavaScript398771,1946,562
Sass27500215,122
Markdown211,41004,297
JSON16101,656
PO File1339514691
SVG5101194
HTML132020
make1409
YAML1007
CSS6006

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity14.69
▷ Minimum class complexity1.00
▷ Maximum class complexity156.00
Average method complexity2.92
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces27
Interfaces30
Traits11
Classes138
▷ Abstract classes53.62%
▷ Concrete classes13396.38%
▷ Final classes3526.32%
Methods1,321
▷ Static methods23918.09%
▷ Public methods1,02977.90%
▷ Protected methods1209.08%
▷ Private methods17213.02%
Functions132
▷ Named functions3425.76%
▷ Anonymous functions9874.24%
Constants134
▷ Global constants128.96%
▷ Class constants12291.04%
▷ Public constants11190.98%

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
8 PNG files occupy 0.15MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
v2/builder-react-app/build/logo512.png9.44KB10.35KB0.00%
v2/builder-react-app/build/static/media/box.0b5ad8d5.png35.95KB15.81KB▼ 56.04%
v2/builder-react-app/build/static/media/footer.9a99b8d9.png28.94KB12.80KB▼ 55.77%
v2/builder-react-app/public/logo512.png9.44KB10.35KB0.00%
v2/builder-react-app/build/logo192.png5.22KB5.57KB0.00%