71% qibla-events

Code Review | Qibla Events

WordPress plugin Qibla Events scored71%from 54 tests.

About plugin

  • Plugin page: qibla-events
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Aug 10, 2018
  • Latest release: Dec 17, 2018
  • Number of updates: 13
  • Update frequency: every 9.9 days
  • Top authors: appandmap (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /857 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.51MB] [CPU: ▲3.79ms] Passed 4 tests

A check of server-side resources used by Qibla Events
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.07 ▲0.6151.46 ▲11.29
Dashboard /wp-admin3.76 ▲0.4250.15 ▼5.97
Posts /wp-admin/edit.php3.89 ▲0.5452.76 ▲6.34
Add New Post /wp-admin/post-new.php6.70 ▲0.82107.61 ▲3.51
Media Library /wp-admin/upload.php3.69 ▲0.4644.37 ▲11.63
Tags /wp-admin/edit-tags.php?taxonomy=tags&post_type=events4.6890.96
Categories /wp-admin/edit-tags.php?taxonomy=event_categories&post_type=events4.6987.18
Add Event /wp-admin/post-new.php?post_type=events4.2070.03
Useful Links /wp-admin/admin.php?page=qb-useful-links3.7043.40
Install Plugins /wp-admin/themes.php?page=qibla-events-install-plugins3.6937.06
Qibla Events /wp-admin/admin.php?page=qibla-events-options3.7143.17
Plugin Options /wp-admin/admin.php?page=?page=qibla-events-options3.4526.92
Locations /wp-admin/edit-tags.php?taxonomy=locations&post_type=events4.2359.49
Events /wp-admin/edit.php?post_type=events3.7441.36

Server storage [IO: ▲8.25MB] [DB: ▲0.01MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 1,069 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Qibla Events: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,196 ▲45014.11 ▼0.478.33 ▲6.3836.02 ▼4.00
Dashboard /wp-admin2,330 ▲1445.15 ▲0.20105.68 ▼1.3385.51 ▲44.17
Posts /wp-admin/edit.php2,238 ▲1492.47 ▲0.4235.78 ▲2.0157.22 ▲21.32
Add New Post /wp-admin/post-new.php1,796 ▲27723.14 ▼0.17730.96 ▲101.4931.55 ▼21.64
Media Library /wp-admin/upload.php1,529 ▲1414.62 ▲0.3399.43 ▲2.2376.71 ▲33.59
Tags /wp-admin/edit-tags.php?taxonomy=tags&post_type=events11,5452.1840.30108.26
Categories /wp-admin/edit-tags.php?taxonomy=event_categories&post_type=events11,6722.6158.8073.36
Add Event /wp-admin/post-new.php?post_type=events3,86112.09355.73294.21
Useful Links /wp-admin/admin.php?page=qb-useful-links1,0522.2531.1447.89
Install Plugins /wp-admin/themes.php?page=qibla-events-install-plugins1,1222.1326.6534.20
Qibla Events /wp-admin/admin.php?page=qibla-events-options1,0622.1227.8044.53
Plugin Options /wp-admin/admin.php?page=?page=qibla-events-options280.440.063.76
Locations /wp-admin/edit-tags.php?taxonomy=locations&post_type=events1,4132.3234.5836.34
Events /wp-admin/edit.php?post_type=events1,2872.4034.6874.50

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 14× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/qibla-events/views/map/googleMap.php
    • > /wp-content/plugins/qibla-events/views/shortcodes/maps.php
    • > /wp-content/plugins/qibla-events/views/map/infoWindow.php
    • > /wp-content/plugins/qibla-events/views/termsList.php
    • > /wp-content/plugins/qibla-events/views/socialsLinks.php
    • > /wp-content/plugins/qibla-events/views/map/markerClusterer.php
    • > /wp-content/plugins/qibla-events/views/template/searchNavigation.php
    • > /wp-content/plugins/qibla-events/views/map/marker.php
    • > /wp-content/plugins/qibla-events/views/events/eventCalendar.php
    • > /wp-content/plugins/qibla-events/views/customFields/listings/listingsLocation.php
  • 303× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'QiblaEvents\\Form\\Forms\\BaseForm' not found in wp-content/plugins/qibla-events/src/Front/ContactForm/ContactForm.php:38
    • > PHP Fatal error
      Uncaught Error: Interface 'QiblaEvents\\Template\\TemplateInterface' not found in wp-content/plugins/qibla-events/src/Template/ShareAndWish.php:38
    • > PHP Fatal error
      Uncaught Error: Interface 'QiblaEvents\\Listings\\ListingsPostInterface' not found in wp-content/plugins/qibla-events/src/Listings/ListingsPost.php:39
    • > PHP Fatal error
      Uncaught Error: Class 'QiblaEvents\\Form\\Factories\\FieldFactory' not found in wp-content/plugins/qibla-events/inc/metaboxFields/relatedPostsFields.php:28
    • > PHP Fatal error
      Uncaught Error: Interface 'QiblaEvents\\TemplateEngine\\TemplateInterface' not found in wp-content/plugins/qibla-events/src/Template/AmenitiesTemplate.php:41
    • > PHP Fatal error
      Uncaught Error: Class 'QiblaEvents\\Admin\\Termbox\\AbstractTermboxForm' not found in wp-content/plugins/qibla-events/src/Admin/Termbox/Icon.php:38
    • > PHP Fatal error
      Uncaught Error: Call to undefined function QiblaEvents\\Functions\\scopeClass() in wp-content/plugins/qibla-events/views/form/loginForm.php:30
    • > PHP Fatal error
      Uncaught Error: Interface 'QiblaEvents\\Template\\TemplateInterface' not found in wp-content/plugins/qibla-events/src/Template/ListingsArchiveFooter.php:38
    • > PHP Fatal error
      Uncaught Error: Class 'QiblaEvents\\Request\\AbstractRequestAjax' not found in wp-content/plugins/qibla-events/src/Filter/Request/RequestFilterAjax.php:40
    • > PHP Fatal error
      Uncaught Error: Interface 'QiblaEvents\\Form\\Interfaces\\Validators' not found in wp-content/plugins/qibla-events/src/Form/Abstracts/Validator.php:38

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/post-new.php?post_type=events
    • > Console-api (warning) in unknown
    http://maps.googleapis.com/maps/api/js?v=3.29&key&libraries=places&geocoding&ver=3.28 234:51 "Google Maps JavaScript API has been loaded directly without a callback. This is not supported and can lead to race conditions and suboptimal performance. For supported loading patterns please see https://goo.gle/js-api-loading"
    • > GET request to /wp-admin/post-new.php?post_type=events
    • > Console-api (severe) in unknown
    http://maps.googleapis.com/maps/api/js?v=3.29&key&libraries=places&geocoding&ver=3.28 152:248 "You are using this API without a key. See https://developers.google.com/maps/documentation/javascript/error-messages?utm_source=maps_js&utm_medium=degraded&utm_campaign=billing#api-key-and-billing-errors"
    • > GET request to /wp-admin/admin.php?page=?page=qibla-events-options
    • > Network (severe)
    wp-admin/admin.php?page=?page=qibla-events-options - Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Optimizations

Plugin configuration 79% from 29 tests

readme.txt 75% 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:
  • Requires at least: Invalid version format
  • Requires php: Invalid version format
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Shortcode page), #2 (Single listing page), #3 (Archive listing page)
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
You can take inspiration from this readme.txt

qibla-events/index.php 85% from 13 tests

The main file in "Qibla Events" v. 1.0.2 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:
  • Description: Please don't use more than 140 characters for the plugin description (currently 164 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("qibla-events.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin65,829 lines of code in 888 files:
LanguageFilesBlank linesComment linesLines of code
PHP4524,96029,10923,615
Sass2132,6203,82712,847
JavaScript1662,5045,87012,644
PO File181,8922,5085,989
SVG6035,493
CSS249372653,692
JSON6001,304
YAML1633186
Markdown119050
XML1009

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity5.57
▷ Minimum class complexity1.00
▷ Maximum class complexity206.00
Average method complexity2.35
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces64
Interfaces39
Traits0
Classes282
▷ Abstract classes3211.35%
▷ Concrete classes25088.65%
▷ Final classes135.20%
Methods1,140
▷ Static methods847.37%
▷ Public methods98786.58%
▷ Protected methods988.60%
▷ Private methods554.82%
Functions231
▷ Named functions13257.14%
▷ Anonymous functions9942.86%
Constants42
▷ Global constants49.52%
▷ Class constants3890.48%
▷ Public constants38100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 0.12MB with 0.04MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/imgs/qibla-mark-16x16.png0.76KB0.97KB0.00%
assets/imgs/banner-premium.png122.93KB39.40KB▼ 67.95%
assets/imgs/vc-sc-icon.png1.95KB0.83KB▼ 57.46%
assets/vendor/photoswipe/default-skin.png0.53KB0.72KB0.00%