83% e-youbica

Code Review | e-youbica

WordPress plugin e-youbica scored83%from 54 tests.

About plugin

  • Plugin page: e-youbica
  • Plugin version: 1.2.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.2.2
  • WordPress version: 6.3.1
  • First release: Feb 25, 2022
  • Latest release: Jun 9, 2023
  • Number of updates: 21
  • Update frequency: every 22.4 days
  • Top authors: eyoubica (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /757 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.51MB] [CPU: ▼18.65ms] Passed 4 tests

An overview of server-side resources used by e-youbica
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1736.33 ▼4.85
Dashboard /wp-admin3.47 ▲0.1744.94 ▼3.65
Posts /wp-admin/edit.php3.58 ▲0.2341.93 ▼5.96
Add New Post /wp-admin/post-new.php3.35 ▼2.5437.85 ▼60.15
Media Library /wp-admin/upload.php3.39 ▲0.1735.74 ▲2.15
e-youbica /wp-admin/options-general.php?page=youbica-settings-page3.3633.51

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for e-youbica
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,923 ▲18813.75 ▼1.0610.54 ▲8.4441.95 ▼5.58
Dashboard /wp-admin2,210 ▲224.86 ▼0.01107.07 ▲1.7348.65 ▲11.36
Posts /wp-admin/edit.php2,093 ▲72.03 ▲0.0338.96 ▲4.2634.93 ▲1.03
Add New Post /wp-admin/post-new.php1,536 ▲323.32 ▲0.20642.40 ▲49.5851.25 ▲2.76
Media Library /wp-admin/upload.php1,392 ▲44.17 ▼0.05108.49 ▲10.2147.27 ▲4.16
e-youbica /wp-admin/options-general.php?page=youbica-settings-page7872.0228.1329.66

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
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

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
Even though everything seems fine, this is not an exhaustive test

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
Please fix the following
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/e-youbica/youbica.php:39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/e-youbica/includes/class-api-user-youbica.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/e-youbica/includes/class-user-youbica.php:6

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)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
2 plugin tags: e-commerce, social

e-youbica/youbica.php 77% from 13 tests

The entry point to "e-youbica" version 1.2.2 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 ("e-youbica.php" instead of "youbica.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 198 characters long)
  • Domain Path: The domain path is invalid: folder "/i18n/languages/" does not exist

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
Good job! No executable or dangerous file extensions detected1,548 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
CSS24437791
PHP7109117627
JavaScript1163117
SVG20113

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity37.50
▷ Minimum class complexity3.00
▷ Maximum class complexity72.00
Average method complexity4.48
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods21
▷ Static methods14.76%
▷ Public methods1990.48%
▷ Protected methods00.00%
▷ Private methods29.52%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/pngegg.png6.40KB2.83KB▼ 55.79%
assets/img/close.png0.34KB0.25KB▼ 27.27%