78% widgets-for-sourceforge-reviews

Code Review | Widgets for SourceForge Reviews

WordPress plugin Widgets for SourceForge Reviews scored78%from 54 tests.

About plugin

  • Plugin page: widgets-for-sourc...
  • Plugin version: 11.1
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3
  • WordPress version: 6.3.1
  • First release: Jul 19, 2021
  • Latest release: Nov 24, 2023
  • Number of updates: 76
  • Update frequency: every 11.3 days
  • Top authors: trustindex (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /4,162 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲1.13MB] [CPU: ▲4.23ms] Passed 4 tests

This is a short check of server-side resources used by Widgets for SourceForge Reviews
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.59 ▲1.1247.53 ▲5.27
Dashboard /wp-admin4.46 ▲1.1553.07 ▲2.00
Posts /wp-admin/edit.php4.50 ▲1.1357.46 ▲7.78
Add New Post /wp-admin/post-new.php7.10 ▲1.2193.98 ▲1.85
Media Library /wp-admin/upload.php4.34 ▲1.1048.20 ▲11.62

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 131 new files
Database: 1 new table, 8 new options
New tables
wp_trustindex_sourceForge_reviews
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
trustindex-sourceForge-active
trustindex-sourceForge-version
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Widgets for SourceForge Reviews: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲4714.67 ▲0.441.57 ▼0.1339.96 ▼5.36
Dashboard /wp-admin2,214 ▲395.69 ▲0.0296.09 ▼6.6473.89 ▲27.94
Posts /wp-admin/edit.php2,122 ▲221.98 ▲0.0140.83 ▲2.3138.56 ▲8.53
Add New Post /wp-admin/post-new.php6,379 ▲4,85327.63 ▲4.40858.35 ▲197.3537.99 ▼18.46
Media Library /wp-admin/upload.php1,419 ▲194.19 ▼0.0299.16 ▲0.5365.03 ▲23.29

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • 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 smoke test targeting server-side errors
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 take a closer look at the following
  • 11× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/widgets-for-sourceforge-reviews/tabs/advanced.php
    • > /wp-content/plugins/widgets-for-sourceforge-reviews/widgets-for-sourceforge-reviews.php
    • > /wp-content/plugins/widgets-for-sourceforge-reviews/trustindex-sourceForge-widget.class.php
    • > /wp-content/plugins/widgets-for-sourceforge-reviews/tabs/setup_trustindex_join.php
    • > /wp-content/plugins/widgets-for-sourceforge-reviews/settings.php
    • > /wp-content/plugins/widgets-for-sourceforge-reviews/tabs/setup_no_reg_header.php
    • > /wp-content/plugins/widgets-for-sourceforge-reviews/tabs/setup_trustindex.php
    • > /wp-content/plugins/widgets-for-sourceforge-reviews/tabs/my_reviews.php
    • > /wp-content/plugins/widgets-for-sourceforge-reviews/tabs/feature_request.php
    • > /wp-content/plugins/widgets-for-sourceforge-reviews/tabs/get_reviews.php
  • 12× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'TrustindexPlugin_sourceForge' not found in wp-content/plugins/widgets-for-sourceforge-reviews/tabs/setup_no_reg_platform.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/widgets-for-sourceforge-reviews/tabs/setup_no_reg.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/widgets-for-sourceforge-reviews/uninstall.php:2
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/upgrade.php): failed to open stream: No such file or directory in wp-content/plugins/widgets-for-sourceforge-reviews/include/activate.php on line 2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/widgets-for-sourceforge-reviews/include/uninstall.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'TrustindexPlugin_sourceForge' not found in wp-content/plugins/widgets-for-sourceforge-reviews/tabs/_get_more_customers.php:1
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/widgets-for-sourceforge-reviews/include/schema.php:4
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/widgets-for-sourceforge-reviews/include/activate.php on line 2
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/upgrade.php' (include_path='.:/usr/share/php') in wp-content/plugins/widgets-for-sourceforge-reviews/include/activate.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_plugin_data() in wp-content/plugins/widgets-for-sourceforge-reviews/include/troubleshooting.php:3

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

widgets-for-sourceforge-reviews/widgets-for-sourceforge-reviews.php Passed 13 tests

"Widgets for SourceForge Reviews" version 11.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
124 characters long description:
Embed SourceForge reviews fast and easily into your WordPress site. Increase SEO, trust and sales using SourceForge reviews.

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
No dangerous file extensions were detected10,479 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
PHP2343389,285
JavaScript63011751,018
CSS413063
SVG42061
JSON10052

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity127.00
▷ Minimum class complexity10.00
▷ Maximum class complexity348.00
Average method complexity4.17
▷ Minimum method complexity1.00
▷ Maximum method complexity59.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods98
▷ Static methods66.12%
▷ Public methods9697.96%
▷ Protected methods00.00%
▷ Private methods22.04%
Functions17
▷ Named functions847.06%
▷ Anonymous functions952.94%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
static/img/platforms.png10.24KB4.08KB▼ 60.12%
static/img/trustindex-sign-logo.png3.34KB0.59KB▼ 82.47%
static/img/yes.png1.91KB0.25KB▼ 87.08%
static/img/no.png1.92KB0.28KB▼ 85.53%