78% qazana

Code Review | Qazana Layout builder for WordPress

WordPress plugin Qazana Layout builder for WordPress scored78%from 54 tests.

About plugin

  • Plugin page: qazana
  • Plugin version: 1.3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9
  • WordPress version: 6.3.1
  • First release: Jun 27, 2017
  • Latest release: Mar 18, 2018
  • Number of updates: 20
  • Update frequency: every 13.3 days
  • Top authors: frankgitonga (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,288 total downloads

Benchmarks

Plugin footprint 83% 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: ▲4.34MB] [CPU: ▲29.56ms] Passed 4 tests

A check of server-side resources used by Qazana Layout builder for WordPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /7.66 ▲4.1980.46 ▲41.78
Dashboard /wp-admin7.70 ▲4.4087.30 ▲25.66
Posts /wp-admin/edit.php7.76 ▲4.4177.42 ▲32.38
Add New Post /wp-admin/post-new.php10.25 ▲4.36127.41 ▲18.41
Media Library /wp-admin/upload.php7.63 ▲4.4177.08 ▲45.13
System Info /wp-admin/admin.php?page=qazana-system-info7.70424.98
Welcome to Qazana /wp-admin/index.php?page=qazana-about7.5460.64
My Library /wp-admin/edit.php?post_type=qazana_library7.6869.78
Tools /wp-admin/admin.php?page=qazana-tools7.5463.41
Settings /wp-admin/admin.php?page=qazana7.5464.43

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 733 new files
Database: no new tables, 10 new options
New WordPress options
_qazana_installed_time
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
_qazana_db_version
db_upgraded
widget_qazana-library
qazana_version

Browser metrics Passed 4 tests

An overview of browser requirements for Qazana Layout builder for WordPress
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,846 ▲10013.75 ▼0.571.72 ▼0.0243.03 ▼1.38
Dashboard /wp-admin2,255 ▲704.89 ▼0.99104.11 ▼20.5541.45 ▼6.00
Posts /wp-admin/edit.php2,200 ▲1112.11 ▲0.1142.42 ▲0.4936.23 ▲0.82
Add New Post /wp-admin/post-new.php1,563 ▲4323.08 ▲0.04596.27 ▼74.8250.02 ▼1.94
Media Library /wp-admin/upload.php1,442 ▲574.32 ▲0.1499.17 ▼5.4444.58 ▼3.78
System Info /wp-admin/admin.php?page=qazana-system-info1,3022.1624.2329.57
Welcome to Qazana /wp-admin/index.php?page=qazana-about8232.1526.3134.57
My Library /wp-admin/edit.php?post_type=qazana_library1,1792.0637.2529.21
Tools /wp-admin/admin.php?page=qazana-tools1,0262.2530.8326.42
Settings /wp-admin/admin.php?page=qazana1,2192.2629.6328.04

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 10 options in the database
    • widget_qazana-library
    • widget_theysaidso_widget
    • _qazana_installed_time
    • theysaidso_admin_options
    • _qazana_db_version
    • can_compress_scripts
    • db_upgraded
    • qazana_version
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/qazana/vendor/mobiledetect/mobiledetectlib/export/exportToJSON.php
  • 27× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function language_attributes() in wp-content/plugins/qazana/templates/default/qazana.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WP_CLI_Command' not found in wp-content/plugins/qazana/includes/wp-cli/commands.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Qazana\\Element_Base' not found in wp-content/plugins/qazana/includes/widgets/elements/repeater.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Qazana\\Extensions\\Base' not found in wp-content/plugins/qazana/includes/extensions/piechart/extension_piechart.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/qazana/includes/extensions/history/views/history-panel-template.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Qazana\\Extensions\\Base' not found in wp-content/plugins/qazana/includes/extensions/counter/extension_counter.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Qazana\\Extensions\\Base' not found in wp-content/plugins/qazana/includes/extensions/wordpress_importer/extension_wordpress_importer.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Qazana\\add_action() in wp-content/plugins/qazana/includes/widgets/shared/carousel.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Qazana\\Extensions\\Base' not found in wp-content/plugins/qazana/includes/extensions/hueman_theme/extension_hueman.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Qazana\\Extensions\\Base' not found in wp-content/plugins/qazana/includes/extensions/iconset_fontawesome/extension_iconset_fontawesome.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Tags: You are using too many tags: 28 tag instead of maximum 10
Please take inspiration from this readme.txt

qazana/qazana.php 92% from 13 tests

"Qazana Layout builder for WordPress" version 1.3.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 157 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin121,071 lines of code in 663 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript22213,4364,22648,430
PHP2377,23513,08232,277
CSS561,30929720,405
Sass1081,7833488,749
JSON5707,969
SVG3316712,987
Markdown1930190
XML1457864

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity10.92
▷ Minimum class complexity1.00
▷ Maximum class complexity134.00
Average method complexity2.21
▷ Minimum method complexity1.00
▷ Maximum method complexity91.00
Code structure
Namespaces22
Interfaces2
Traits0
Classes211
▷ Abstract classes209.48%
▷ Concrete classes19190.52%
▷ Final classes31.57%
Methods1,758
▷ Static methods22212.63%
▷ Public methods1,36177.42%
▷ Protected methods28216.04%
▷ Private methods1156.54%
Functions139
▷ Named functions9971.22%
▷ Anonymous functions4028.78%
Constants149
▷ Global constants74.70%
▷ Class constants14295.30%
▷ Public constants142100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 compressed PNG files occupy 0.02MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo-small-light.png0.42KB0.46KB0.00%
assets/images/placeholder@2x.png12.41KB12.33KB▼ 0.69%
assets/images/placeholder.png5.27KB5.10KB▼ 3.17%