88% citadela-directory-lite

Code Review | Citadela Directory Plugin Lite - Listing Directories for WordPress & Gutenberg

WordPress plugin Citadela Directory Plugin Lite - Listing Directories for WordPress & Gutenberg scored 88% from 54 tests.

About plugin

  • Plugin page: citadela-director...
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-5.8
  • WordPress version: 5.8.1
  • First release: Jun 16, 2020
  • Latest release: Jul 21, 2021
  • Number of updates: 14
  • Update frequency: every 28.6 days
  • Top authors: AitThemes (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

20+ active / 1,020 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.70MB] [CPU: ▼138.37ms] Passed 4 tests

Server-side resources used by Citadela Directory Plugin Lite - Listing Directories for WordPress & Gutenberg
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.25 ▲0.5336.41 ▲15.38
Dashboard /wp-admin3.84 ▲0.7951.24 ▲2.79
Posts /wp-admin/edit.php3.90 ▲0.7947.30 ▲3.15
Add New Post /wp-admin/post-new.php6.27 ▲0.8496.29 ▼561.03
Media Library /wp-admin/upload.php3.70 ▲0.7036.49 ▲1.62
Add New /wp-admin/post-new.php?post_type=citadela-item3.9852.81
All Items /wp-admin/edit.php?post_type=citadela-item3.8443.06

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 139 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Citadela Directory Plugin Lite - Listing Directories for WordPress & Gutenberg
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,186 ▲58019.39 ▲3.6618.49 ▲6.8249.58 ▼1.02
Dashboard /wp-admin3,294 ▲3577.88 ▲1.89168.38 ▲24.26107.20 ▼9.00
Posts /wp-admin/edit.php3,092 ▲3564.72 ▲1.8887.12 ▲25.7689.07 ▲1.07
Add New Post /wp-admin/post-new.php1,565 ▼31118.57 ▼0.59341.03 ▼56.67105.40 ▼5.03
Media Library /wp-admin/upload.php1,938 ▲1315.62 ▲0.56127.77 ▼14.20113.76 ▼8.88
Add New /wp-admin/post-new.php?post_type=citadela-item3,8149.89254.40155.45
All Items /wp-admin/edit.php?post_type=citadela-item1,7724.6181.8868.11

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

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

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 18× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
    • > /wp-content/plugins/citadela-directory-lite/plugin/libs/butterbean/tmpl/control-multi-avatars.php
    • > /wp-content/plugins/citadela-directory-lite/plugin/libs/butterbean/tmpl/control-select.php
    • > /wp-content/plugins/citadela-directory-lite/plugin/libs/butterbean/tmpl/control-color.php
    • > /wp-content/plugins/citadela-directory-lite/plugin/libs/butterbean/tmpl/control-checkboxes.php
    • > /wp-content/plugins/citadela-directory-lite/plugin/libs/butterbean/tmpl/manager.php
    • > /wp-content/plugins/citadela-directory-lite/plugin/libs/butterbean/tmpl/control-parent.php
    • > /wp-content/plugins/citadela-directory-lite/plugin/libs/butterbean/tmpl/nav.php
    • > /wp-content/plugins/citadela-directory-lite/plugin/libs/butterbean/tmpl/control-radio-image.php
    • > /wp-content/plugins/citadela-directory-lite/plugin/libs/butterbean/tmpl/control-radio.php
    • > /wp-content/plugins/citadela-directory-lite/plugin/libs/butterbean/tmpl/control-palette.php
  • 37× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'ButterBean_Setting' not found in wp-content/plugins/citadela-directory-lite/plugin/libs/butterbean/inc/settings/class-setting-datetime.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'ButterBean_Control_Radio' not found in wp-content/plugins/citadela-directory-lite/plugin/libs/butterbean/inc/controls/class-control-radio-image.php:20
    • > PHP Notice
      Trying to get property 'subtitle' of non-object in wp-content/plugins/citadela-directory-lite/plugin/cpt/item/templates/parts/single-item-page-title.php on line 7
    • > PHP Fatal error
      Uncaught Error: Class 'CitadelaDirectoryFunctions' not found in wp-content/plugins/citadela-directory-lite/plugin/cpt/item/templates/parts/single-item-map.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'ButterBean_Setting' not found in wp-content/plugins/citadela-directory-lite/plugin/libs/butterbean/inc/settings/class-setting-array.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'ButterBean_Control' not found in wp-content/plugins/citadela-directory-lite/plugin/libs/butterbean/inc/controls/class-control-image.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/citadela-directory-lite/plugin/libs/butterbean/tmpl/control-datetime.php:46
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/citadela-directory-lite/plugin/libs/butterbean/class-butterbean.php:144
    • > PHP Notice
      Undefined variable: meta in wp-content/plugins/citadela-directory-lite/plugin/cpt/item/templates/parts/single-item-page-title.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/citadela-directory-lite/plugin/cpt/item/templates/single-item.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

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
These attributes need to be fixed:
  • Tags: Too many tags (16 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

citadela-directory-lite/citadela-directory-lite.php Passed 13 tests

The main PHP file in "Citadela Directory Plugin Lite - Listing Directories for WordPress & Gutenberg" ver. 1.1.0 adds more information about the plugin and also serves as the entry point for this plugin
32 characters long description:
Create directory listing website

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
There were no executable files found in this plugin73,567 lines of code in 104 files:
LanguageFilesBlank linesComment linesLines of code
JSON43057,821
SVG40139,316
PHP681,1942,2653,365
CSS9387981,937
JavaScript193764341,128

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity9.86
▷ Minimum class complexity1.00
▷ Maximum class complexity57.00
Average method complexity2.42
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes36
▷ Abstract classes00.00%
▷ Concrete classes36100.00%
▷ Final classes12.78%
Methods223
▷ Static methods5424.22%
▷ Public methods21094.17%
▷ Protected methods83.59%
▷ Private methods52.24%
Functions23
▷ Named functions1460.87%
▷ Anonymous functions939.13%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
15 compressed PNG files occupy 1.80MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
plugin/assets/leaflet/images/marker-icon-2x.png2.41KB2.52KB0.00%
plugin/assets/leaflet/images/marker-icon.png1.43KB1.55KB0.00%
plugin/assets/leaflet/images/layers-2x.png1.23KB1.67KB0.00%
design/css/admin/img/color-pattern.png0.18KB0.11KB▼ 40.21%
plugin/settings/template/img/screen-directory-blocks-opt.png347.80KB349.15KB0.00%