77% web2store-from-adelya

Code Review | Web2Store from Adelya

WordPress plugin Web2Store from Adelya scored77%from 54 tests.

About plugin

  • Plugin page: web2store-from-ad...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-4.7.5
  • WordPress version: 6.3.1
  • First release: Aug 17, 2017
  • Latest release: Dec 21, 2017
  • Number of updates: 9
  • Update frequency: every 14.1 days
  • Top authors: adelyadev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /693 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼7.33ms] Passed 4 tests

A check of server-side resources used by Web2Store from Adelya
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.44 ▼0.0226.82 ▼13.45
Dashboard /wp-admin3.37 ▲0.0643.56 ▼5.00
Posts /wp-admin/edit.php3.42 ▲0.0648.35 ▲3.23
Add New Post /wp-admin/post-new.php5.95 ▲0.0680.89 ▼11.24
Media Library /wp-admin/upload.php3.29 ▲0.0636.15 ▲0.36
Adelya /wp-admin/options-general.php?page=adminAdelya3.3031.25

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

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

Browser metrics Passed 4 tests

Web2Store from Adelya: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7113.19 ▼1.391.70 ▼0.1745.71 ▼3.74
Dashboard /wp-admin2,212 ▲215.87 ▲0.80106.13 ▲2.8138.73 ▼5.18
Posts /wp-admin/edit.php2,095 ▲62.01 ▼0.0134.24 ▼5.1733.84 ▲0.24
Add New Post /wp-admin/post-new.php1,542 ▲2318.40 ▼4.91634.27 ▼39.5253.96 ▼0.07
Media Library /wp-admin/upload.php1,388 ▲34.21 ▲0.0395.93 ▼12.3540.69 ▼6.35
Adelya /wp-admin/options-general.php?page=adminAdelya1,2422.0727.4530.98

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_adelya_newsletter
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=adminAdelya
    • > Notice in wp-content/plugins/web2store-from-adelya/form.php+18
    Undefined index: access_verif
    • > GET request to /wp-admin/options-general.php?page=adminAdelya
    • > Notice in wp-content/plugins/web2store-from-adelya/form.php+34
    Undefined index: codeGroup
    • > GET request to /wp-admin/options-general.php?page=adminAdelya
    • > Notice in wp-content/plugins/web2store-from-adelya/form.php+35
    Undefined index: server
    • > GET request to /wp-admin/options-general.php?page=adminAdelya
    • > Notice in wp-content/plugins/web2store-from-adelya/form.php+108
    Undefined variable: i
    • > GET request to /wp-admin/options-general.php?page=adminAdelya
    • > Warning in wp-content/plugins/web2store-from-adelya/shortcode_list.php+21
    count(): Parameter must be an array or an object that implements Countable
    • > GET request to /wp-admin/options-general.php?page=adminAdelya
    • > Notice in wp-content/plugins/web2store-from-adelya/resize.php+50
    Undefined variable: resize

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
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/web2store-from-adelya/newsletterWidget.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Screenshot_admin :), #2 (Screenshot_Shortcode :), #3 (Screenshot_Module :), #4 (Screenshot_translate_admin :), #5 (Screenshot_translate_module :)
  • Screenshots: Add descriptions for screenshots #0, #0, #0, #0, #0 in web2store-from-adelya/assets to your readme.txt
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === web2store-from-adelya === )
You can look at the official readme.txt

web2store-from-adelya/adelya.php 92% from 13 tests

The primary PHP file in "Web2Store from Adelya" version 1.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("web2store-from-adelya.php" instead of "adelya.php")

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
No dangerous file extensions were detected684 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP820783560
JSON10098
CSS115126

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
8 PNG files occupy 1.73MB with 1.18MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
asset/icon-128x128.png19.56KB2.88KB▼ 85.28%
asset/banner-772x250.png183.73KB101.14KB▼ 44.95%
asset/screenshot_Shortcode.png151.71KB43.78KB▼ 71.14%
asset/screenshot_translate_admin.png285.83KB83.84KB▼ 70.67%
asset/screenshot_translate_module.png398.34KB121.98KB▼ 69.38%