62% fermopoint-for-woocommerce

Code Review | Fermo!Point Woocommerce

WordPress plugin Fermo!Point Woocommerce scored62%from 54 tests.

About plugin

  • Plugin page: fermopoint-for-wo...
  • Plugin version: 1.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.6
  • WordPress version: 6.3.1
  • First release: Nov 20, 2015
  • Latest release: Jun 20, 2018
  • Number of updates: 8
  • Update frequency: every 117.9 days
  • Top authors: digitalissimo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,209 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▼0.69MB] [CPU: ▼35.53ms] Passed 4 tests

A check of server-side resources used by Fermo!Point Woocommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.2241.80 ▲2.56
Dashboard /wp-admin3.27 ▼0.0827.14 ▼38.61
Posts /wp-admin/edit.php3.27 ▼0.0926.55 ▼23.11
Add New Post /wp-admin/post-new.php3.27 ▼2.6229.30 ▼69.62
Media Library /wp-admin/upload.php3.27 ▲0.0325.24 ▼10.79
Fermo!Point /wp-admin/admin.php?page=fermopoint_settings_init3.2726.37

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 42 new files
Database: no new tables, 10 new options
New WordPress options
widget_recent-posts
FERMOPOINT_ACCOUNT_NICKNAME
FERMOPOINT_ACCOUNT_ID
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
db_upgraded
FERMOPOINT_ACCOUNT_BORNDATE
FERMOPOINT_ACCOUNT_SECRET
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Fermo!Point Woocommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,889 ▲14313.63 ▼0.586.53 ▲4.9438.35 ▼1.85
Dashboard /wp-admin2,210 ▲185.87 ▲0.9496.16 ▼9.5740.11 ▼0.72
Posts /wp-admin/edit.php2,093 ▲42.02 ▲0.0333.38 ▼1.3832.08 ▼1.74
Add New Post /wp-admin/post-new.php1,527 ▲718.54 ▼4.82653.53 ▼17.0357.74 ▲2.50
Media Library /wp-admin/upload.php1,386 ▲14.21 ▼0.0195.11 ▼18.8543.29 ▼3.41
Fermo!Point /wp-admin/admin.php?page=fermopoint_settings_init8422.1424.8623.47

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
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'register_menuFermopoint' not found or invalid function name
  • This plugin does not fully uninstall, leaving 10 options in the database
    • widget_theysaidso_widget
    • FERMOPOINT_ACCOUNT_SECRET
    • FERMOPOINT_ACCOUNT_NICKNAME
    • widget_recent-comments
    • widget_recent-posts
    • FERMOPOINT_ACCOUNT_BORNDATE
    • can_compress_scripts
    • theysaidso_admin_options
    • FERMOPOINT_ACCOUNT_ID
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=fermopoint_settings_init
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'register_menuFermopoint' not found or invalid function name

SRP 0% 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
Please fix the following items
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/fermopoint-for-woocommerce/admin/partials/fermopoint-admin-display.php
    • > /wp-content/plugins/fermopoint-for-woocommerce/public/partials/fermopoint-public-display.php
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/fermopoint-for-woocommerce/admin/class-fermopoint-admin.php:427
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/fermopoint-for-woocommerce/function.php:69
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/fermopoint-for-woocommerce/admin/class-fermopoint-admin-legacy.php:335
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/fermopoint-for-woocommerce/admin/includes/settings-general-fermopoint.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === fermopoint-for-woocommerce === )
The official readme.txt might help

fermopoint-for-woocommerce/fermopoint-for-woocommerce.php Passed 13 tests

"Fermo!Point Woocommerce" version 1.3.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
61 characters long description:
Module for integrating Fermo!Points collecting points system.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin1,605 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
PHP173,0397701,406
JavaScript3818106142
XML110054
CSS21283

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity4.46
▷ Minimum class complexity1.00
▷ Maximum class complexity18.00
Average method complexity1.73
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods62
▷ Static methods58.06%
▷ Public methods5791.94%
▷ Protected methods00.00%
▷ Private methods58.06%
Functions34
▷ Named functions34100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/logo.png2.80KB1.59KB▼ 43.24%