62% free-quotation

Code Review | Free Quotation

WordPress plugin Free Quotation scored62%from 54 tests.

About plugin

  • Plugin page: free-quotation
  • Plugin version: 3.1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.1.1
  • WordPress version: 6.3.1
  • First release: Dec 7, 2013
  • Latest release: Feb 21, 2015
  • Number of updates: 150
  • Update frequency: every 3.0 days
  • Top authors: kris_IV (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active /10,909 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.14MB] [CPU: ▼4.67ms] Passed 4 tests

Analyzing server-side resources used by Free Quotation
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1439.88 ▼4.79
Dashboard /wp-admin3.44 ▲0.1451.98 ▼4.12
Posts /wp-admin/edit.php3.55 ▲0.1951.04 ▼0.15
Add New Post /wp-admin/post-new.php6.04 ▲0.1597.78 ▼8.51
Media Library /wp-admin/upload.php3.36 ▲0.1336.29 ▼1.25
Free Quotation /wp-admin/admin.php?page=fq_menu_page3.3933.47
CSV /wp-admin/admin.php?page=fq_add_CSV3.3536.07
FQ settings /wp-admin/admin.php?page=fq_admin_settings3.4632.92

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 42 new files
Database: 2 new tables, 10 new options
New tables
wp_free_quotation_tags
wp_free_quotation_kris_IV
New WordPress options
widget_foo_widget
theysaidso_admin_options
recovery_mode_email_last_sent
db_upgraded
widget_recent-comments
widget_recent-posts
widget_fq2_widget
fq_db_version
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Free Quotation: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,973 ▲21213.50 ▼0.878.31 ▲6.5240.45 ▼4.70
Dashboard /wp-admin2,276 ▲995.77 ▲0.0992.07 ▼3.4486.16 ▲43.02
Posts /wp-admin/edit.php2,142 ▲392.27 ▲0.2737.51 ▼8.3333.62 ▼8.20
Add New Post /wp-admin/post-new.php1,557 ▲2923.26 ▲0.15706.68 ▲23.2537.14 ▼16.01
Media Library /wp-admin/upload.php1,443 ▲494.39 ▲0.1197.97 ▼9.9584.61 ▲41.85
Free Quotation /wp-admin/admin.php?page=fq_menu_page7091.557.2518.36
CSV /wp-admin/admin.php?page=fq_add_CSV9581.9428.7732.86
FQ settings /wp-admin/admin.php?page=fq_admin_settings2,5502.3443.8664.10

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The uninstall procedure failed, leaving 2 tables in the database
    • wp_free_quotation_kris_IV
    • wp_free_quotation_tags
  • Zombie WordPress options detected upon uninstall: 10 options
    • widget_recent-comments
    • widget_fq2_widget
    • recovery_mode_email_last_sent
    • widget_foo_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • fq_db_version

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/admin.php?page=fq_menu_page
    • > Parse error in wp-content/plugins/free-quotation/incloudes/Free_Quotation_admin_FQ.php+353
    syntax error, unexpected end of file
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=fq_admin_settings
    • > Notice in wp-content/plugins/free-quotation/incloudes/Free_Quotation_admin_settings.php+68
    Undefined index: fq_kk_option4
    • > GET request to /wp-admin/admin.php?page=fq_admin_settings
    • > Notice in wp-content/plugins/free-quotation/incloudes/Free_Quotation_admin_settings.php+101
    Undefined index: fq_kk_tekst1
    • > GET request to /wp-admin/admin.php?page=fq_admin_settings
    • > Notice in wp-content/plugins/free-quotation/incloudes/Free_Quotation_admin_settings.php+106
    Undefined index: fq_kk_tekst2

SRP 0% 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 items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/free-quotation/incloudes/Free_Quotation_displayer.php
  • 34× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Undefined variable: instance in wp-content/plugins/free-quotation/incloudes/Free_Quotation_widget.php on line 34
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/free-quotation/incloudes/Free_Quotation_instal.php on line 6
    • > PHP Notice
      Undefined variable: fq_display_life in wp-content/plugins/free-quotation/incloudes/Free_Quotation_displayer.php on line 84
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/free-quotation/Free_Quotation_main.php on line 24
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/free-quotation/incloudes/Free_Quotation_admin_widget.php:10
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/free-quotation/incloudes/Free_Quotation_admin_addCSV.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/free-quotation/Free_Quotation_main.php:26
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/free-quotation/incloudes/Free_Quotation_widget.php on line 6
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/free-quotation/incloudes/Free_Quotation_admin_settings.php on line 6
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/free-quotation/incloudes/Free_Quotation_widget.php on line 34

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 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 14 tag instead of maximum 10
Please take inspiration from this readme.txt

free-quotation/Free_Quotation_main.php 92% from 13 tests

The main file in "Free Quotation" v. 3.1.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("free-quotation.php" instead of "Free_Quotation_main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin3,490 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP17271422,451
CSS36636901
JavaScript1017138

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity17.50
▷ Minimum class complexity13.00
▷ Maximum class complexity22.00
Average method complexity5.12
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
18 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/eos.png0.23KB0.10KB▼ 55.98%
images/Free_Quotation_16.png0.41KB0.43KB0.00%
css/images/ui-icons_222222_256x240.png6.76KB4.17KB▼ 38.24%
css/images/ui-icons_2e83ff_256x240.png4.44KB4.17KB▼ 6.02%
css/images/ui-bg_glass_75_e6e6e6_1x400.png0.26KB0.15KB▼ 42.37%