77% start-my-review

Code Review | StartMyReview

WordPress plugin StartMyReview scored 77% from 54 tests.

About plugin

  • Plugin page: start-my-review
  • Plugin version: 3.0.2
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.1
  • WordPress version: 6.3.1
  • First release: May 6, 2019
  • Latest release: Jul 31, 2019
  • Number of updates: 8
  • Update frequency: every 12.3 days
  • Top authors: dstalfire (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 470 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: ▲0.01MB] [CPU: ▼2.41ms] Passed 4 tests

This is a short check of server-side resources used by StartMyReview
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0141.61 ▲1.44
Dashboard /wp-admin3.31 ▲0.0147.78 ▲1.92
Posts /wp-admin/edit.php3.36 ▲0.0147.24 ▲0.40
Add New Post /wp-admin/post-new.php5.89 ▲0.0184.76 ▼11.43
Media Library /wp-admin/upload.php3.23 ▲0.0034.80 ▼0.05

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 118 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

StartMyReview: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲8113.68 ▼0.931.73 ▼0.2542.07 ▼5.42
Dashboard /wp-admin2,222 ▲315.85 ▲0.98105.71 ▲0.2639.13 ▼5.59
Posts /wp-admin/edit.php2,108 ▲191.99 ▼0.0334.52 ▼5.2131.71 ▼4.36
Add New Post /wp-admin/post-new.php1,559 ▲1517.99 ▼0.35590.89 ▼22.5566.25 ▲13.03
Media Library /wp-admin/upload.php1,404 ▲194.23 ▲0.0294.49 ▼5.8040.16 ▼2.57

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

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
  • 7× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/start-my-review/includes/reviewme.php
    • > /wp-content/plugins/start-my-review/assets/internal_layouts/settings.php
    • > /wp-content/plugins/start-my-review/assets/internal_layouts/smr_auth.php
    • > /wp-content/plugins/start-my-review/assets/internal_layouts/customers.php
    • > /wp-content/plugins/start-my-review/includes/yelp.php
    • > /wp-content/plugins/start-my-review/assets/internal_layouts/stats.php
    • > /wp-content/plugins/start-my-review/includes/requests.php
  • 28× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Undefined variable: wpdb in wp-content/plugins/start-my-review/assets/internal_layouts/reviews.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_remote_get() in wp-content/plugins/start-my-review/assets/internal_layouts/panel.php:37
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/start-my-review/assets/internal_layouts/business_user.php:2
    • > PHP Warning
      Use of undefined constant SMReview_REVIEW_URI - assumed 'SMReview_REVIEW_URI' (this will throw an Error in a future version of PHP) in wp-content/plugins/start-my-review/assets/internal_layouts/panel.php on line 26
    • > PHP Notice
      Undefined variable: current_version in wp-content/plugins/start-my-review/assets/internal_layouts/settings.php on line 16
    • > PHP Notice
      Undefined variable: wpdb in wp-content/plugins/start-my-review/assets/external_layout/side_comments.tpl.php on line 7
    • > PHP Warning
      Use of undefined constant SMReview_REVIEW_URI - assumed 'SMReview_REVIEW_URI' (this will throw an Error in a future version of PHP) in wp-content/plugins/start-my-review/assets/internal_layouts/panel.php on line 25
    • > PHP Notice
      Undefined variable: accounts in wp-content/plugins/start-my-review/assets/internal_layouts/customers.php on line 10
    • > PHP Notice
      Undefined variable: haveBusinesses in wp-content/plugins/start-my-review/assets/internal_layouts/stats.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/start-my-review/assets/internal_layouts/reviews.php:2

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)
No browser issues were found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 81% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Contributors: No tags were detected
  • Contributors: Contributors not specified
  • Tags: There are too many tags (19 tag instead of maximum 10)
The official readme.txt is a good inspiration

start-my-review/startmyreview.php 85% from 13 tests

"StartMyReview" version 3.0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Description: Please improve your description making it at least 10 characters long (currently 0 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("start-my-review.php" instead of "startmyreview.php")

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
There were no executable files found in this plugin34,467 lines of code in 51 files:
LanguageFilesBlank linesComment linesLines of code
CSS14295,95818,720
JavaScript184,9872,29014,245
PHP19241311,502

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.44
Average class complexity9.83
▷ Minimum class complexity3.00
▷ Maximum class complexity21.00
Average method complexity3.04
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods26
▷ Static methods2180.77%
▷ Public methods26100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants133.33%
▷ Class constants266.67%
▷ Public constants2100.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
56 PNG files occupy 0.48MB with 0.16MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/if__yelp_1250003.png16.22KB6.55KB▼ 59.62%
assets/images/ypins.png5.72KB3.48KB▼ 39.20%
assets/images/header.png0.17KB0.15KB▼ 11.80%
assets/images/reviews.png20.52KB8.42KB▼ 58.98%
assets/images/presets.png0.55KB0.60KB0.00%