83% safreen-widgets

Code Review | Safree Widgets

WordPress plugin Safree Widgets scored83%from 54 tests.

About plugin

  • Plugin page: safreen-widgets
  • Plugin version: 1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.2.2
  • WordPress version: 6.3.1
  • First release: Jan 28, 2016
  • Latest release: Jul 19, 2019
  • Number of updates: 16
  • Update frequency: every 79.3 days
  • Top authors: imon Hasan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

500+ active /20,734 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.23MB] [CPU: ▼9.57ms] Passed 4 tests

A check of server-side resources used by Safree Widgets
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.73 ▲0.2342.76 ▲0.66
Dashboard /wp-admin3.56 ▲0.2250.78 ▼2.77
Posts /wp-admin/edit.php3.67 ▲0.2849.67 ▼4.68
Add New Post /wp-admin/post-new.php6.16 ▲0.2484.30 ▼28.66
Media Library /wp-admin/upload.php3.48 ▲0.2236.25 ▼2.18

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: no files
Database: no new tables, 9 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_ctup-ads-aboutwidget
widget_recent-comments
widget_ctup-ads-clietwidget
can_compress_scripts
widget_ctup-ads-teamwidget
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Safree Widgets
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.35 ▼1.261.68 ▼0.0642.36 ▼1.26
Dashboard /wp-admin2,207 ▲195.82 ▲0.0099.11 ▼3.6439.22 ▼1.48
Posts /wp-admin/edit.php2,093 ▲42.01 ▼0.0335.59 ▼1.4334.37 ▼1.90
Add New Post /wp-admin/post-new.php1,518 ▼623.50 ▲0.37575.93 ▼103.9753.64 ▲2.31
Media Library /wp-admin/upload.php1,392 ▲74.24 ▲0.0599.29 ▼3.5444.51 ▲1.50

Uninstaller [IO: ✅] [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
  • This plugin does not fully uninstall, leaving 9 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_ctup-ads-teamwidget
    • widget_ctup-ads-clietwidget
    • widget_ctup-ads-aboutwidget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

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
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/safreen-widgets/safree-widgets.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/safreen-widgets/ourclient.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/safreen-widgets/aboutus.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/safreen-widgets/ourteam.php:9

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 90% 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
3 plugin tags: clients, safreen, team members

safreen-widgets/safree-widgets.php 77% from 13 tests

The main PHP file in "Safree Widgets" ver. 1.6 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("safreen-widgets.php" instead of "safree-widgets.php")
  • Domain Path: The domain path should be prefixed with a forward slash character ("/translation")
  • Domain Path: Note that the domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("translation")

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 plugin5,551 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
XML159164,769
PHP431744751
CSS110224
JavaScript11217

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity43.00
▷ Minimum class complexity23.00
▷ Maximum class complexity67.00
Average method complexity11.50
▷ Minimum method complexity1.00
▷ Maximum method complexity41.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin