74% reviews-sorted

Code Review | Reviews Sorted

WordPress plugin Reviews Sorted scored74%from 54 tests.

About plugin

  • Plugin page: reviews-sorted
  • Plugin version: 2.3.6
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.3.2
  • WordPress version: 6.3.1
  • First release: Jul 11, 2022
  • Latest release: Nov 30, 2023
  • Number of updates: 30
  • Update frequency: every 17.3 days
  • Top authors: eurisko (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /930 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.26MB] [CPU: ▲5.37ms] Passed 4 tests

Server-side resources used by Reviews Sorted
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.2842.55 ▲2.57
Dashboard /wp-admin3.56 ▲0.2551.78 ▼0.72
Posts /wp-admin/edit.php3.67 ▲0.3152.81 ▲9.45
Add New Post /wp-admin/post-new.php6.14 ▲0.25107.25 ▲10.16
Media Library /wp-admin/upload.php3.48 ▲0.2541.29 ▲10.30
Email notifications /wp-admin/admin.php?page=reviews-sorted-email-templates3.4636.25
Review Settings /wp-admin/admin.php?page=reviews-sorted-testimonial-settings3.4850.42
Local Business Details /wp-admin/admin.php?page=reviews-sorted-business-details3.4538.50
Reviews List /wp-admin/admin.php?page=reviews-sorted-reviews-list3.4539.47
Form Settings /wp-admin/admin.php?page=reviews-sorted-form-settings3.4635.24
Premium Version /wp-admin/admin.php?page=reviews-sorted-premium-version3.4539.26
Reviews Sorted /wp-admin/admin.php?page=reviews-sorted3.4437.14

Server storage [IO: ▲2.66MB] [DB: ▲0.08MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 70 new files
Database: 3 new tables, 7 new options
New tables
wp_email_schedule
wp_reviews_email
wp_reviews
New WordPress options
widget_theysaidso_widget
abl_review_sorted_version
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Reviews Sorted
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,878 ▲13114.41 ▲0.162.40 ▲0.7340.59 ▼4.93
Dashboard /wp-admin2,247 ▲705.58 ▼0.0890.91 ▼5.9440.07 ▼3.08
Posts /wp-admin/edit.php2,152 ▲521.95 ▼0.0538.34 ▲1.9534.58 ▲3.45
Add New Post /wp-admin/post-new.php1,565 ▲3923.64 ▲0.07682.36 ▼0.3549.30 ▼2.81
Media Library /wp-admin/upload.php1,607 ▲2044.56 ▲0.39108.02 ▲11.2442.06 ▲0.34
Email notifications /wp-admin/admin.php?page=reviews-sorted-email-templates1,0931.9824.3534.78
Review Settings /wp-admin/admin.php?page=reviews-sorted-testimonial-settings1,2643.0845.3467.29
Local Business Details /wp-admin/admin.php?page=reviews-sorted-business-details9162.0324.5827.02
Reviews List /wp-admin/admin.php?page=reviews-sorted-reviews-list8572.0026.7728.13
Form Settings /wp-admin/admin.php?page=reviews-sorted-form-settings1,1652.1727.0130.45
Premium Version /wp-admin/admin.php?page=reviews-sorted-premium-version9101.9723.4231.05
Reviews Sorted /wp-admin/admin.php?page=reviews-sorted9192.1423.2724.36

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie tables detected upon uninstall: 3 tables
    • wp_reviews_email
    • wp_reviews
    • wp_email_schedule
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 9× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/reviews-sorted/templates/admin/review-edit.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/reviews-sorted/templates/admin/reviews-sorted.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/reviews-sorted/templates/admin/premium-version.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/reviews-sorted/templates/admin/email-templates.php:41
    • > PHP Fatal error
      Uncaught Error: Class 'ReviewsSortedCommon' not found in wp-content/plugins/reviews-sorted/templates/admin/form-settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/reviews-sorted/templates/reviews-form.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_media() in wp-content/plugins/reviews-sorted/templates/admin/testimonial-settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/reviews-sorted/templates/admin/business-details.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/reviews-sorted/templates/admin/reviews-list.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
8 plugin tags: star rating, rating, user rating, schema, product review...

reviews-sorted/reviews-sorted.php 92% from 13 tests

"Reviews Sorted" version 2.3.6's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 292 characters long)

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
Success! There were no dangerous files found in this plugin3,555 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
PHP335642092,937
CSS24759466
SVG10088
JavaScript2101564

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity30.50
▷ Minimum class complexity12.00
▷ Maximum class complexity75.00
Average method complexity3.95
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods40
▷ Static methods1845.00%
▷ Public methods40100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants545.45%
▷ Class constants654.55%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
12 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/rs-icon-5-1.png0.53KB0.54KB0.00%
assets/images/stars-inactive_2.png3.06KB1.50KB▼ 50.88%
assets/images/stars-inactive.png2.56KB1.51KB▼ 41.26%
assets/images/rs-icon-2-1.png0.39KB0.39KB0.00%
assets/logo.png10.69KB4.61KB▼ 56.87%