84% score-nco-widget

Code Review | Score'n'co Widget

WordPress plugin Score'n'co Widget scored84%from 54 tests.

About plugin

  • Plugin page: score-nco-widget
  • Plugin version: 1.6.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-6.0
  • WordPress version: 6.3.1
  • First release: Jun 21, 2016
  • Latest release: Jun 12, 2022
  • Number of updates: 25
  • Update frequency: every 87.3 days
  • Top authors: scorenco (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active /4,076 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
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼7.81ms] Passed 4 tests

An overview of server-side resources used by Score'n'co Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0438.99 ▼4.72
Dashboard /wp-admin3.34 ▼0.0148.78 ▼13.40
Posts /wp-admin/edit.php3.39 ▲0.0346.79 ▼0.10
Add New Post /wp-admin/post-new.php5.94 ▲0.0581.24 ▼13.02
Media Library /wp-admin/upload.php3.26 ▲0.0336.70 ▲1.25

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_scorenco_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Score'n'co Widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲3014.24 ▲0.021.95 ▲0.0644.32 ▲0.66
Dashboard /wp-admin2,202 ▲255.61 ▲0.0386.89 ▲1.9041.48 ▲3.66
Posts /wp-admin/edit.php2,107 ▲72.01 ▲0.0134.29 ▼1.1233.18 ▼3.33
Add New Post /wp-admin/post-new.php1,530 ▲423.31 ▼0.04672.54 ▲25.9255.58 ▼0.15
Media Library /wp-admin/upload.php1,401 ▲74.13 ▼0.11108.80 ▲14.8846.37 ▲6.21

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_scorenco_widget
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/score-nco-widget/scorenco_widget.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
8 plugin tags: widget, sports, rsultats, matchs, calendrier...

score-nco-widget/scorenco_widget.php 92% from 13 tests

The entry point to "Score'n'co Widget" version 1.6.1 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("score-nco-widget.php" instead of "scorenco_widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected114 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1174499
JavaScript21715

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity2.80
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG images were found in this plugin