62% another-wordpress-classifieds-plugin

Code Review | WordPress Classifieds Plugin - Ad Directory & Listings by AWP Classifieds

WordPress plugin WordPress Classifieds Plugin - Ad Directory & Listings by AWP Classifieds scored62%from 54 tests.

About plugin

  • Plugin page: another-wordpress...
  • Plugin version: 4.3.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.2.2
  • WordPress version: 6.3.1
  • First release: Mar 22, 2009
  • Latest release: Jul 27, 2023
  • Number of updates: 451
  • Update frequency: every 11.6 days
  • Top authors: awpcp (97.78%)sswells (2.44%)

Code review

54 tests

User reviews

297 reviews

Install metrics

6,000+ active /738,257 total downloads

Benchmarks

Plugin footprint 64% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲8.98MB] [CPU: ▲61.05ms] 50% from 4 tests

A check of server-side resources used by WordPress Classifieds Plugin - Ad Directory & Listings by AWP Classifieds
Please fix the following
  • RAM: Total memory usage should be kept under 10MB (currently 12.84MB on /wp-admin/edit.php?post_type=awpcp_listing)
  • Extra RAM: Try to keep extra memory usage under 5MB (currently 8.98MB on /wp-admin/awpcp.php?page=awpcp-form-fields)
PageMemory (MB)CPU Time (ms)
Home /12.26 ▲8.80115.91 ▲74.44
Dashboard /wp-admin12.36 ▲9.06104.83 ▲57.60
Posts /wp-admin/edit.php12.43 ▲9.08109.17 ▲56.11
Add New Post /wp-admin/post-new.php14.90 ▲9.01166.82 ▲61.91
Media Library /wp-admin/upload.php12.28 ▲9.05102.66 ▲68.58
Classifieds /wp-admin/edit.php?post_type=awpcp_listing12.84111.00

Server storage [IO: ▲11.04MB] [DB: ▲0.02MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 926 new files
Database: 6 new tables, 17 new options
New tables
wp_awpcp_payments
wp_awpcp_tasks
wp_awpcp_ad_regions
wp_awpcp_adfees
wp_awpcp_admeta
wp_awpcp_credit_plans
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
awpcp-flush-rewrite-rules
widget_recent-posts
awpcp-installed-or-upgraded
widget_awpcp-categories
widget_awpcp-random-ads
awpcp-installed
theysaidso_admin_options
...

Browser metrics Passed 4 tests

An overview of browser requirements for WordPress Classifieds Plugin - Ad Directory & Listings by AWP Classifieds
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,940 ▲20514.29 ▲0.022.08 ▲0.0637.92 ▼7.15
Dashboard /wp-admin2,348 ▲1605.83 ▲0.92128.69 ▲20.2845.23 ▲4.67
Posts /wp-admin/edit.php2,233 ▲1442.85 ▲0.8051.67 ▲11.5132.32 ▼5.42
Add New Post /wp-admin/post-new.php1,589 ▲4721.49 ▼1.75718.29 ▲96.3236.94 ▼11.34
Media Library /wp-admin/upload.php1,525 ▲1375.19 ▲0.93110.46 ▲11.5144.09 ▲1.29
Dashboard /wp-admin/awpcp.php260.440.0814.52
Classifieds /wp-admin/edit.php?post_type=awpcp_listing1,5033.8681.6030.89
Debug /wp-admin/awpcp.php?page=awpcp-debug260.440.065.47
Fees /wp-admin/awpcp.php?page=awpcp-admin-fees260.440.105.93
Categories /wp-admin/awpcp.php?page=awpcp-admin-categories260.440.096.66
Credit Plans /wp-admin/awpcp.php?page=awpcp-admin-credit-plans260.440.076.38
Manage Credit /wp-admin/awpcp.php?page=/wp-admin/users.php?action=awpcp-manage-credits260.440.077.08
Uninstall /wp-admin/awpcp.php?page=awpcp-admin-uninstall260.440.085.99
Settings /wp-admin/awpcp.php?page=awpcp-admin-settings260.440.075.26
Form Fields /wp-admin/awpcp.php?page=awpcp-form-fields260.440.085.85

Uninstaller [IO: ▲0.00MB] [DB: ▲0.02MB] 50% 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 does not fully uninstall, leaving 6 tables in the database
    • wp_awpcp_ad_regions
    • wp_awpcp_adfees
    • wp_awpcp_payments
    • wp_awpcp_admeta
    • wp_awpcp_credit_plans
    • wp_awpcp_tasks
  • This plugin does not fully uninstall, leaving 17 options in the database
    • theysaidso_admin_options
    • awpcp-flush-rewrite-rules
    • awpcp-installed-or-upgraded
    • awpcp-options
    • widget_theysaidso_widget
    • widget_recent-posts
    • awpcp-installed
    • widget_awpcp-categories
    • can_compress_scripts
    • awpcp_listing_category_children
    • ...

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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 fix the following
  • 8× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/another-wordpress-classifieds-plugin/templates/components/form-steps.tpl.php
    • > /wp-content/plugins/another-wordpress-classifieds-plugin/templates/components/payment-terms-list.tpl.php
    • > /wp-content/plugins/another-wordpress-classifieds-plugin/templates/components/listings-actions.tpl.php
    • > /wp-content/plugins/another-wordpress-classifieds-plugin/templates/admin/settings/settings-grid.tpl.php
    • > /wp-content/plugins/another-wordpress-classifieds-plugin/templates/components/classifieds-menu.tpl.php
    • > /wp-content/plugins/another-wordpress-classifieds-plugin/frontend/templates/listings-pagination.tpl.php
    • > /wp-content/plugins/another-wordpress-classifieds-plugin/frontend/templates/html-widget-users-dropdown.tpl.php
    • > /wp-content/plugins/another-wordpress-classifieds-plugin/admin/templates/admin-panel-uninstall.tpl.php
  • 430× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/another-wordpress-classifieds-plugin/templates/components/classifieds-menu.tpl.php on line 7
    • > PHP Fatal error
      Uncaught Error: Interface 'AWPCP_FormSteps' not found in wp-content/plugins/another-wordpress-classifieds-plugin/includes/frontend/class-submit-listing-form-steps.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function awpcp_print_message() in wp-content/plugins/another-wordpress-classifieds-plugin/frontend/templates/payments-checkout-payment-page.tpl.php:6
    • > PHP Fatal error
      Uncaught Error: Interface 'AWPCP_ListTableActionInterface' not found in wp-content/plugins/another-wordpress-classifieds-plugin/includes/admin/listings/class-send-to-facebook-page-listing-table-action.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'AWPCP_Upgrade_Task_Runner' not found in wp-content/plugins/another-wordpress-classifieds-plugin/includes/upgrade/class-add-contact-phone-number-digits-upgrade-task-handler.php:9
    • > PHP Notice
      Undefined variable: messages in wp-content/plugins/another-wordpress-classifieds-plugin/frontend/templates/page-buy-credits-final-step.tpl.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/another-wordpress-classifieds-plugin/frontend/templates/widget-latest-ads-form.tpl.php:2
    • > PHP Warning
      implode(): Invalid arguments passed in wp-content/plugins/another-wordpress-classifieds-plugin/templates/frontend/listings.tpl.php on line 16
    • > PHP Fatal error
      Uncaught Error: Class 'AWPCP_BasePage' not found in wp-content/plugins/another-wordpress-classifieds-plugin/includes/views/frontend/buy-credits/class-buy-credits-page.php:6
    • > PHP Fatal error
      Uncaught Error: Interface 'AWPCP_Upgrade_Task_Runner' not found in wp-content/plugins/another-wordpress-classifieds-plugin/includes/upgrade/class-update-categories-term-count-upgrade-task-runner.php:11

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following user-side errors
    • > GET request to /wp-admin/awpcp.php
    • > Network (severe)
    wp-admin/awpcp.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/awpcp.php?page=awpcp-debug
    • > Network (severe)
    wp-admin/awpcp.php?page=awpcp-debug - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/awpcp.php?page=awpcp-admin-fees
    • > Network (severe)
    wp-admin/awpcp.php?page=awpcp-admin-fees - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/awpcp.php?page=awpcp-admin-categories
    • > Network (severe)
    wp-admin/awpcp.php?page=awpcp-admin-categories - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/awpcp.php?page=awpcp-admin-credit-plans
    • > Network (severe)
    wp-admin/awpcp.php?page=awpcp-admin-credit-plans - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/awpcp.php?page=/wp-admin/users.php?action=awpcp-manage-credits
    • > Network (severe)
    wp-admin/awpcp.php?page=/wp-admin/users.php?action=awpcp-manage-credits - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/awpcp.php?page=awpcp-admin-uninstall
    • > Network (severe)
    wp-admin/awpcp.php?page=awpcp-admin-uninstall - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/awpcp.php?page=awpcp-admin-settings
    • > Network (severe)
    wp-admin/awpcp.php?page=awpcp-admin-settings - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/awpcp.php?page=awpcp-form-fields
    • > Network (severe)
    wp-admin/awpcp.php?page=awpcp-form-fields - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
9 plugin tags: classified theme, wp classified, classified, classified ads, listings...

another-wordpress-classifieds-plugin/awpcp.php 92% from 13 tests

The entry point to "WordPress Classifieds Plugin - Ad Directory & Listings by AWP Classifieds" version 4.3.1 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("another-wordpress-classifieds-plugin.php" instead of "awpcp.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected139,018 lines of code in 861 files:
LanguageFilesBlank linesComment linesLines of code
PO File919,12923,41864,336
PHP68613,61613,73652,691
JavaScript1523,3621,55121,539
CSS10367197
Markdown1320169
JSON20044
SVG10042

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity8.56
▷ Minimum class complexity1.00
▷ Maximum class complexity256.00
Average method complexity2.20
▷ Minimum method complexity1.00
▷ Maximum method complexity70.00
Code structure
Namespaces2
Interfaces15
Traits9
Classes507
▷ Abstract classes101.97%
▷ Concrete classes49798.03%
▷ Final classes10.20%
Methods3,430
▷ Static methods371.08%
▷ Public methods2,40470.09%
▷ Protected methods1404.08%
▷ Private methods88625.83%
Functions890
▷ Named functions69077.53%
▷ Anonymous functions20022.47%
Constants113
▷ Global constants6658.41%
▷ Class constants4741.59%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
36 compressed PNG files occupy 0.09MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
resources/images/image-enable.png0.45KB0.60KB0.00%
resources/images/admin-sidebar-gray-grad.png0.09KB0.18KB0.00%
resources/vendors/jquery-plupload-queue/img/buttons.png1.41KB1.15KB▼ 18.00%
resources/images/image-primary.png0.65KB0.72KB0.00%
resources/images/file-delete.png0.57KB0.62KB0.00%