73% altima-lookbook-free-for-woocommerce

Code Review | Altima Lookbook Free for WooCommerce

WordPress plugin Altima Lookbook Free for WooCommerce scored73%from 54 tests.

About plugin

  • Plugin page: altima-lookbook-f...
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.4
  • WordPress version: 6.3.1
  • First release: Feb 17, 2016
  • Latest release: Apr 22, 2020
  • Number of updates: 27
  • Update frequency: every 56.6 days
  • Top authors: altima-interactive (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /9,687 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.39MB] [CPU: ▼2.36ms] Passed 4 tests

A check of server-side resources used by Altima Lookbook Free for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.88 ▲0.4238.94 ▼1.73
Dashboard /wp-admin3.68 ▲0.3848.14 ▼1.59
Posts /wp-admin/edit.php3.80 ▲0.4454.35 ▲6.33
Add New Post /wp-admin/post-new.php6.28 ▲0.4087.21 ▼10.22
Media Library /wp-admin/upload.php3.60 ▲0.3838.06 ▲4.11

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 70 new files
Database: 2 new tables, 17 new options
New tables
wp_lookbook_sliders_free
wp_lookbook_slides_free
New WordPress options
can_compress_scripts
wplb_free_show_pinit_slide
wplb_free_thumb_width
wplb_free_hspt_icon
wplb_free_show_addcart_in_popup
wplb_free_thumb_height
widget_recent-posts
widget_theysaidso_widget
wplb_free_allow_ext
db_upgraded
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Altima Lookbook Free for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,899 ▲16414.07 ▼0.313.73 ▲1.5840.21 ▼8.27
Dashboard /wp-admin2,271 ▲835.39 ▲0.48114.69 ▲11.9744.58 ▲1.46
Posts /wp-admin/edit.php2,137 ▲482.57 ▲0.5440.51 ▲5.1834.50 ▲0.70
Add New Post /wp-admin/post-new.php1,567 ▲3422.88 ▼0.29657.03 ▲36.8033.74 ▼14.60
Media Library /wp-admin/upload.php1,453 ▲744.58 ▲0.35100.27 ▲0.2441.15 ▼1.93

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
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/altima-lookbook-free-for-woocommerce/uninstall.php+16
    Constant ALTIMA_LOOKBOOK_PLUGIN_DIR already defined
  • This plugin does not fully uninstall, leaving 17 options in the database
    • wplb_free_show_desc_in_popup
    • widget_recent-posts
    • wplb_free_hspt_icon
    • wplb_free_thumb_height
    • wplb_free_allow_ext
    • db_upgraded
    • can_compress_scripts
    • wplb_free_max_file_size
    • wplb_free_show_pinit_slide
    • wplb_free_thumb_width
    • ...

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
The smoke test was a success, however most plugin functionality was not tested

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
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/altima-lookbook-free-for-woocommerce/lookbook.php on line 10
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-includes/pluggable.php' (include_path='.:/usr/share/php') in wp-content/plugins/altima-lookbook-free-for-woocommerce/lookbook.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/altima-lookbook-free-for-woocommerce/includes/alfw_slider.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_upload_dir() in wp-content/plugins/altima-lookbook-free-for-woocommerce/includes/alfw_settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/altima-lookbook-free-for-woocommerce/admin/admin.php:1455
    • > PHP Warning
      require_once(ABSPATHwp-includes/pluggable.php): failed to open stream: No such file or directory in wp-content/plugins/altima-lookbook-free-for-woocommerce/lookbook.php on line 10

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

readme.txt Passed 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
4 plugin tags: lookbook, woocommerce, slider, hotspot

altima-lookbook-free-for-woocommerce/lookbook.php 85% from 13 tests

The entry point to "Altima Lookbook Free for WooCommerce" version 1.1.0 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("altima-lookbook-free-for-woocommerce.php" instead of "lookbook.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
Success! There were no dangerous files found in this plugin4,677 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
PHP94203492,380
JavaScript201871521,346
CSS48211951

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity40.67
▷ Minimum class complexity1.00
▷ Maximum class complexity104.00
Average method complexity5.96
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods24
▷ Static methods14.17%
▷ Public methods24100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions37
▷ Named functions3594.59%
▷ Anonymous functions25.41%
Constants14
▷ Global constants14100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
29 PNG files occupy 1.45MB with 0.64MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/css/images/ui-bg_glass_95_fef1ec_1x400.png0.32KB0.15KB▼ 54.82%
admin/images/ok_btn_icon.png1.58KB0.86KB▼ 45.74%
admin/css/images/ui-bg_flat_0_aaaaaa_40x100.png0.21KB0.08KB▼ 58.96%
admin/images/cancel_btn_icon.png1.51KB0.68KB▼ 54.99%
admin/css/images/ui-icons_217bc0_256x240.png4.44KB4.17KB▼ 6.02%