10% fenshop

Code Review | FenShop (gaming shop for minecraft & steam games)

WordPress plugin FenShop (gaming shop for minecraft & steam games) scored10%from 54 tests.

About plugin

  • Plugin page: fenshop
  • Plugin version: 1.13.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.8
  • WordPress version: 6.3.1
  • First release: Nov 6, 2016
  • Latest release: Jun 16, 2017
  • Number of updates: 23
  • Update frequency: every 9.4 days
  • Top authors: fensoft (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,394 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • Install procedure had errors
    • > Notice in wp-content/plugins/fenshop/FenShop.php+25
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.52MB] [CPU: ▼58.03ms] Passed 4 tests

Analyzing server-side resources used by FenShop (gaming shop for minecraft & steam games)
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.46 ▼1.006.43 ▼42.63
Dashboard /wp-admin2.48 ▼0.827.44 ▼45.14
Posts /wp-admin/edit.php2.48 ▼0.877.18 ▼46.92
Add New Post /wp-admin/post-new.php2.48 ▼3.408.42 ▼97.44
Media Library /wp-admin/upload.php2.48 ▼0.748.09 ▼29.74
FenShop /wp-admin/options-general.php?page=fenshop-settings2.496.97

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 48 new files
Database: 1 new table, 6 new options
New tables
wp_fenshop_cookies
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for FenShop (gaming shop for minecraft & steam games)
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2914.37 ▲0.021.81 ▲0.1244.50 ▼0.84
Dashboard /wp-admin2,202 ▲225.56 ▼0.1190.55 ▼0.4642.66 ▲0.85
Posts /wp-admin/edit.php2,104 ▲41.98 ▼0.0234.97 ▼3.0235.78 ▼1.17
Add New Post /wp-admin/post-new.php1,530 ▲423.08 ▼0.21681.92 ▼10.3250.88 ▼2.64
Media Library /wp-admin/upload.php1,398 ▼24.19 ▲0.1095.09 ▼22.0843.42 ▼6.54
FenShop /wp-admin/options-general.php?page=fenshop-settings1,0612.0222.2031.10

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/fenshop/FenShop.php+25
    Trying to access array offset on value of type bool
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_fenshop_cookies
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
  • 23 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=fenshop-settings
    • > Notice in wp-content/plugins/fenshop/FenShop.php+840
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/options-general.php?page=fenshop-settings
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=fenshop-settings
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/fenshop/FenShop.php:844

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (Exemple de page de choix d'achat/Example of french page of buy), #2 (Exemple de page de vote/Example of french page of vote)
The official readme.txt might help

fenshop/FenShop.php 92% from 13 tests

The principal PHP file in "FenShop (gaming shop for minecraft & steam games)" v. 1.13.2 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("fenshop.php" instead of "FenShop.php")

Code Analysis 97% from 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 plugin1,810 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
CSS1222261927
PHP410017838
HTML317045

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
It is recommended to fix the following
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 222)
Cyclomatic complexity
Average complexity per logical line of code0.80
Average class complexity68.25
▷ Minimum class complexity3.00
▷ Maximum class complexity245.00
Average method complexity7.26
▷ Minimum method complexity1.00
▷ Maximum method complexity222.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods43
▷ Static methods1637.21%
▷ Public methods43100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
19 PNG files occupy 0.92MB with 0.63MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/votes/serveurs-minecraft.com.png128.23KB42.28KB▼ 67.03%
assets/votes/topminecraft.fr.png69.23KB18.39KB▼ 73.43%
screenshot-1.png68.45KB31.35KB▼ 54.21%
assets/votes/rpg-paradize.com.png77.29KB25.13KB▼ 67.49%
assets/votes/minecraft-serveurs.com.png24.27KB4.45KB▼ 81.67%