68% control-listings

Code Review | Control Listings - Classifieds Ads Directory Portal Manager

WordPress plugin Control Listings - Classifieds Ads Directory Portal Manager scored68%from 54 tests.

About plugin

  • Plugin page: control-listings
  • Plugin version: 1.0.4
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.3.2
  • WordPress version: 6.3.1
  • First release: May 12, 2023
  • Latest release: Nov 15, 2023
  • Number of updates: 26
  • Update frequency: every 7.2 days
  • Top authors: razib_ (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /1,084 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲3.22MB] [CPU: ▲31.81ms] Passed 4 tests

Analyzing server-side resources used by Control Listings - Classifieds Ads Directory Portal Manager
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /6.71 ▲3.2568.13 ▲26.86
Dashboard /wp-admin6.51 ▲3.2078.01 ▲28.08
Posts /wp-admin/edit.php6.56 ▲3.2180.55 ▲37.29
Add New Post /wp-admin/post-new.php9.29 ▲3.40130.71 ▲37.01
Media Library /wp-admin/upload.php6.47 ▲3.2465.78 ▲35.29
Add New /wp-admin/post-new.php?post_type=ctrl_listings6.8598.26
Categories /wp-admin/edit-tags.php?taxonomy=listing_cat&post_type=ctrl_listings6.5672.12
Tags /wp-admin/edit-tags.php?taxonomy=listing_tag&post_type=ctrl_listings6.4663.64
All Listings /wp-admin/edit.php?post_type=ctrl_listings6.9662.97
Settings /wp-admin/edit.php?post_type=ctrl_listings&page=listing-settings6.5871.80

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 778 new files
Database: 1 new table, 6 new options
New tables
wp_control_listings_bookmarks
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Control Listings - Classifieds Ads Directory Portal Manager
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,965 ▲20313.68 ▼1.0312.32 ▲10.4540.49 ▼6.29
Dashboard /wp-admin2,241 ▲615.60 ▼0.0296.60 ▲4.9942.41 ▼3.97
Posts /wp-admin/edit.php2,146 ▲461.99 ▼0.0439.33 ▲2.6636.68 ▲0.18
Add New Post /wp-admin/post-new.php1,794 ▲25623.68 ▲0.83727.66 ▲74.7843.16 ▼28.36
Media Library /wp-admin/upload.php1,467 ▲644.18 ▼0.0099.22 ▼3.0645.57 ▼1.00
Add New /wp-admin/post-new.php?post_type=ctrl_listings4,66111.02347.3889.23
Categories /wp-admin/edit-tags.php?taxonomy=listing_cat&post_type=ctrl_listings1,6513.7748.6429.65
Tags /wp-admin/edit-tags.php?taxonomy=listing_tag&post_type=ctrl_listings1,2892.1227.5029.84
All Listings /wp-admin/edit.php?post_type=ctrl_listings1,1871.9132.3731.22
Settings /wp-admin/edit.php?post_type=ctrl_listings&page=listing-settings2,4394.05109.5169.79

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_control_listings_bookmarks
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
Please take a closer look at the following
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/control-listings/views/loop/map.php
    • > /wp-content/plugins/control-listings/views/single/tabs.php
    • > /wp-content/plugins/control-listings/views/single/slider.php
  • 235× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Undefined variable: columns in wp-content/plugins/control-listings/views/my-account/user-listings.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_user_logged_in() in wp-content/plugins/control-listings/views/modal.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/control-listings/views/loop/content-none.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/control-listings/vendor/composer/installers/src/Composer/Installers/FuelInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/control-listings/vendor/composer/installers/src/Composer/Installers/TaoInstaller.php:7
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/control-listings/views/single/tabs.php on line 16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/control-listings/views/single/enquiry/bookmarks.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/control-listings/vendor/composer/installers/src/Composer/Installers/AttogramInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/control-listings/views/loop/filter-map.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function control_listings_get_ratings_by_type() in wp-content/plugins/control-listings/views/single/sidebar/reviews.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Tags: There are too many tags (11 tag instead of maximum 10)
You can look at the official readme.txt

control-listings/control-listings.php Passed 13 tests

"Control Listings - Classifieds Ads Directory Portal Manager" version 1.0.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
40 characters long description:
Classifieds ads directory portal manager

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected69,308 lines of code in 728 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1817,2199,27026,707
PHP3923,6605,37021,521
CSS541,04817713,264
Sass911,3611,3067,123
JSON300407
LESS2915161
YAML3313123
SVG2002

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity6.26
▷ Minimum class complexity1.00
▷ Maximum class complexity67.00
Average method complexity2.39
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces19
Interfaces1
Traits1
Classes258
▷ Abstract classes72.71%
▷ Concrete classes25197.29%
▷ Final classes155.98%
Methods985
▷ Static methods36537.06%
▷ Public methods78379.49%
▷ Protected methods12012.18%
▷ Private methods828.32%
Functions183
▷ Named functions16187.98%
▷ Anonymous functions2212.02%
Constants16
▷ Global constants1275.00%
▷ Class constants425.00%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
33 PNG files occupy 0.07MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/wpmetabox/meta-box/img/jqueryui/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%
vendor/wpmetabox/meta-box/img/jqueryui/ui-bg_glass_75_e6e6e6_1x400.png0.11KB0.14KB0.00%
assets/marker/academics.png1.12KB0.61KB▼ 45.43%
vendor/wpmetabox/meta-box/img/jqueryui/ui-icons_cd0a0a_256x240.png4.27KB4.11KB▼ 3.78%
assets/leaflet/images/marker-shadow.png0.60KB1.16KB0.00%