67% community-yard-sale

Code Review | Community Yard Sale

WordPress plugin Community Yard Sale scored 67% from 53 tests.

About plugin

  • Plugin page: community-yard-sale
  • Plugin version: 1.1.11
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.2.1
  • WordPress version: 5.8.1
  • First release: Aug 29, 2011
  • Latest release: Oct 16, 2021
  • Number of updates: 112
  • Update frequency: every 33.0 days
  • Top authors: msimpson (100%)

Code review

53 tests

User reviews

5 reviews

Install metrics

30+ active / 4,458 total downloads

Benchmarks

Plugin footprint 65% 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.28MB] [CPU: ▼265.60ms] Passed 4 tests

A check of server-side resources used by Community Yard Sale
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.09 ▲0.3733.19 ▲9.69
Dashboard /wp-admin3.38 ▲0.3241.30 ▼1.88
Posts /wp-admin/edit.php3.42 ▲0.3246.03 ▼4.18
Add New Post /wp-admin/post-new.php5.68 ▲0.2592.31 ▼1,052.77
Media Library /wp-admin/upload.php3.26 ▲0.2533.23 ▼3.56
Yard Sale /wp-admin/plugins.php?page=YSPluginSettings3.3333.03

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 324 new files
Database: 1 new table, 4 new options
New tables
wp_yardsale
New WordPress options
YSPlugin_DropOnUninstall
YSPlugin__installed
YSPlugin_GMapApiKey
YSPlugin__version

Browser metrics Passed 4 tests

Checking browser requirements for Community Yard Sale
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,794 ▲19017.46 ▲1.9018.45 ▲10.6249.38 ▲1.22
Dashboard /wp-admin2,938 ▲885.88 ▼0.02136.39 ▼1.00103.69 ▲3.59
Posts /wp-admin/edit.php2,711 ▲52.68 ▼0.0162.94 ▼2.5996.22 ▼5.16
Add New Post /wp-admin/post-new.php1,656 ▲17718.73 ▲1.86366.55 ▲33.99106.88 ▼1.71
Media Library /wp-admin/upload.php1,780 ▲55.02 ▲0.02145.60 ▼5.22112.19 ▼6.08
Yard Sale /wp-admin/plugins.php?page=YSPluginSettings2,2695.81113.84181.85

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
The following items require your attention
  • Zombie tables were found after uninstall: 1 table
    • wp_yardsale
  • Zombie WordPress options were found after uninstall: 4 options
    • YSPlugin__installed
    • YSPlugin_GMapApiKey
    • YSPlugin_DropOnUninstall
    • YSPlugin__version

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/community-yard-sale/yardsale.php:48

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
    • > GET request to /wp-admin/plugins.php?page=YSPluginSettings
    • > Network (severe)
    wp-content/plugins/community-yard-sale/css/images/ui-bg_flat_75_ffffff_40x100.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/plugins.php?page=YSPluginSettings
    • > Network (severe)
    wp-content/plugins/community-yard-sale/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/plugins.php?page=YSPluginSettings
    • > Network (severe)
    wp-content/plugins/community-yard-sale/css/images/ui-bg_glass_65_ffffff_1x400.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/plugins.php?page=YSPluginSettings
    • > Network (severe)
    wp-content/plugins/community-yard-sale/css/images/ui-bg_glass_75_e6e6e6_1x400.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Map view of listings), #2 (Table view of listings)
The official readme.txt might help

community-yard-sale/yardsale.php 77% from 13 tests

The principal PHP file in "Community Yard Sale" v. 1.1.11 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("community-yard-sale.php" instead of "yardsale.php")
  • Description: The description should be shorter than 140 characters (currently 175 characters long)
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin2,540 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP103395691,378
JavaScript56874456
CSS242163417
PO File18991289

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity18.25
▷ Minimum class complexity1.00
▷ Maximum class complexity63.00
Average method complexity2.57
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes450.00%
▷ Concrete classes450.00%
▷ Final classes00.00%
Methods91
▷ Static methods00.00%
▷ Public methods6470.33%
▷ Protected methods2729.67%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size 0% from 1 test

Image compression 0% from 1 test

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
303 PNG files occupy 0.58MB with 0.18MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
markers/132.png0.98KB0.67KB▼ 31.64%
markers/218.png1.04KB0.69KB▼ 32.99%
markers/85.png0.91KB0.65KB▼ 28.17%
markers/270.png1.09KB0.73KB▼ 33.39%
markers/142.png0.87KB0.61KB▼ 29.35%