83% bettings-widget

Code Review | Bettin.gs widget

WordPress plugin Bettin.gs widget scored83%from 54 tests.

About plugin

  • Plugin page: bettings-widget
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.3.2
  • WordPress version: 6.3.1
  • First release: Feb 24, 2014
  • Latest release: Mar 9, 2020
  • Number of updates: 14
  • Update frequency: every 157.5 days
  • Top authors: sericson (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,545 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.04ms] Passed 4 tests

An overview of server-side resources used by Bettin.gs widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0353.66 ▲14.15
Dashboard /wp-admin3.33 ▲0.0352.51 ▼7.70
Posts /wp-admin/edit.php3.39 ▲0.0354.45 ▲0.52
Add New Post /wp-admin/post-new.php5.92 ▲0.0399.34 ▼8.12
Media Library /wp-admin/upload.php3.26 ▲0.0334.65 ▼4.84

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
widget_bettings-widget
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Bettin.gs widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.25 ▼0.111.91 ▼0.0438.63 ▼9.37
Dashboard /wp-admin2,195 ▲185.62 ▼0.0485.09 ▼13.0142.26 ▼1.52
Posts /wp-admin/edit.php2,103 ▲31.97 ▲0.0339.99 ▲2.0338.68 ▲3.78
Add New Post /wp-admin/post-new.php1,534 ▲818.37 ▼2.62614.92 ▼104.2568.44 ▲13.22
Media Library /wp-admin/upload.php1,400 ▼04.26 ▲0.05104.88 ▼1.6050.69 ▲6.10

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_bettings-widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% 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 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bettings-widget/bettings-widget.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Donate link: Invalid URI found ("paypal.me/samuelericson")
  • Screenshots: Screenshot #1 (Stats in the sidebar on your blog.) image missing
  • Plugin Name: You should set the name of your plugin on the first line ( === bettings-widget === )
The official readme.txt might help

bettings-widget/bettings-widget.php Passed 13 tests

"Bettin.gs widget" version 1.1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
30 characters long description:
Show your stats from Bettin.gs

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected69 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1255569

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.08
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin