10% stella-flags

Code Review | Stella Flags Widget

WordPress plugin Stella Flags Widget scored10%from 54 tests.

About plugin

  • Plugin page: stella-flags
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.4
  • WordPress version: 6.3.1
  • First release: Jan 16, 2013
  • Latest release: Jan 16, 2013
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: Real99 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,909 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/stella-flags/stella-flags.php+54
    Function create_function() is deprecated

Server metrics [RAM: ▼1.94MB] [CPU: ▼60.62ms] Passed 4 tests

An overview of server-side resources used by Stella Flags Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.415.59 ▼37.60
Dashboard /wp-admin2.08 ▼1.276.20 ▼57.32
Posts /wp-admin/edit.php2.08 ▼1.287.13 ▼44.32
Add New Post /wp-admin/post-new.php2.08 ▼3.815.75 ▼103.25
Media Library /wp-admin/upload.php2.08 ▼1.155.88 ▼28.23

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_stella_flags
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Stella Flags Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.23 ▼0.051.66 ▲0.0048.80 ▲6.81
Dashboard /wp-admin2,198 ▲215.57 ▼0.0684.11 ▼4.0738.55 ▼3.27
Posts /wp-admin/edit.php2,100 ▼31.95 ▼0.0435.21 ▼7.3034.44 ▼4.80
Add New Post /wp-admin/post-new.php1,531 ▲523.00 ▼0.01682.76 ▲50.3855.11 ▲2.44
Media Library /wp-admin/upload.php1,400 ▼34.17 ▼0.09111.43 ▲13.8845.95 ▲1.80

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/stella-flags/stella-flags.php+54
    Function create_function() is deprecated
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_stella_flags
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/stella-flags/stella-flags.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Stable tag: Empty value
Please take inspiration from this readme.txt

stella-flags/stella-flags.php Passed 13 tests

The main PHP script in "Stella Flags Widget" version 1.0 is automatically included on every request by WordPress
94 characters long description:
Creates language selector with country flags. Based on Stella Widget tutorial by Artem Popov.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin50 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP17950
CSS1010

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity5.00
▷ Minimum class complexity1.00
▷ Maximum class complexity9.00
Average method complexity2.60
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods480.00%
▷ Protected methods00.00%
▷ Private methods120.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
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
PNG images were not found in this plugin