84% goracash

Code Review | Goracash

WordPress plugin Goracash scored84%from 54 tests.

About plugin

  • Plugin page: goracash
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Aug 25, 2015
  • Latest release: Oct 22, 2018
  • Number of updates: 23
  • Update frequency: every 50.3 days
  • Top authors: davaxi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active /1,848 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.15MB] [CPU: ▼3.88ms] Passed 4 tests

Server-side resources used by Goracash
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1745.15 ▲4.09
Dashboard /wp-admin3.46 ▲0.1146.53 ▼15.30
Posts /wp-admin/edit.php3.57 ▲0.2149.74 ▲2.31
Add New Post /wp-admin/post-new.php6.06 ▲0.1792.89 ▼1.96
Media Library /wp-admin/upload.php3.38 ▲0.1535.50 ▼0.58

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 88 new files
Database: no new tables, 8 new options
New WordPress options
widget_goracash_iframe
widget_goracash_banner
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Goracash
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲8113.24 ▼1.162.85 ▲0.9444.61 ▼2.04
Dashboard /wp-admin2,230 ▲424.88 ▼0.00107.31 ▼11.4640.21 ▼3.73
Posts /wp-admin/edit.php2,113 ▲212.05 ▲0.0838.72 ▼0.6036.84 ▲4.20
Add New Post /wp-admin/post-new.php1,537 ▲1823.45 ▲0.01619.03 ▼46.9865.89 ▲11.36
Media Library /wp-admin/upload.php1,415 ▲274.21 ▼0.01101.17 ▼2.7545.16 ▼0.30

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 8 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_goracash_iframe
    • widget_recent-comments
    • widget_goracash_banner
    • theysaidso_admin_options

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 everything seems fine, this is not an exhaustive test

SRP 50% 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 fix the following items
  • 47× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/goracash/includes/goracash-api-php-client/tests/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/goracash/includes/goracash-api-php-client/tests/bootstrap.php on line 19
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/goracash/includes/goracash-api-php-client/tests/lead/LeadEstimationPro.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/goracash/includes/free.content.widget.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Goracash\\Service' not found in wp-content/plugins/goracash/includes/goracash-api-php-client/src/Service/Contact.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Goracash\\Exception' not found in wp-content/plugins/goracash/includes/goracash-api-php-client/src/Service/Exception.php:23
    • > PHP Warning
      require_once(wp-content/plugins/goracash/includes/goracash-api-php-client/tests/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/goracash/includes/goracash-api-php-client/tests/bootstrap.php on line 19
    • > PHP Fatal error
      Uncaught Error: Class 'Goracash\\Service\\Data' not found in wp-content/plugins/goracash/includes/goracash-api-php-client/src/Service/DataDaily.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Goracash\\Service\\Lead' not found in wp-content/plugins/goracash/includes/goracash-api-php-client/src/Service/LeadEstimationPro.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Goracash\\Service' not found in wp-content/plugins/goracash/includes/goracash-api-php-client/src/Service/Phone.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Goracash\\Service\\Lead' not found in wp-content/plugins/goracash/includes/goracash-api-php-client/src/Service/LeadHealthPro.php:21

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Donate link: Invalid url: ""
Please take inspiration from this readme.txt

goracash/wp-goracash.php 92% from 13 tests

The entry point to "Goracash" version 1.1 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("goracash.php" instead of "wp-goracash.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected7,866 lines of code in 75 files:
LanguageFilesBlank linesComment linesLines of code
PHP589422,3136,345
SVG100640
PO File3247260611
XML20066
JSON30060
Markdown116049
CSS321847
YAML10026
Bourne Shell14013
INI1017
JavaScript1302

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity6.87
▷ Minimum class complexity1.00
▷ Maximum class complexity27.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes54
▷ Abstract classes712.96%
▷ Concrete classes4787.04%
▷ Final classes00.00%
Methods479
▷ Static methods234.80%
▷ Public methods45294.36%
▷ Protected methods193.97%
▷ Private methods81.67%
Functions7
▷ Named functions114.29%
▷ Anonymous functions685.71%
Constants28
▷ Global constants00.00%
▷ Class constants28100.00%
▷ Public constants28100.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
PNG images were not found in this plugin