72% wp-seedbank

Code Review | WP-Seedbank

WordPress plugin WP-Seedbank scored72%from 54 tests.

About plugin

  • Plugin page: wp-seedbank
  • Plugin version: 0.4.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.2-3.9
  • WordPress version: 6.3.1
  • First release: Jul 24, 2013
  • Latest release: Apr 17, 2014
  • Number of updates: 132
  • Update frequency: every 18.8 days
  • Top authors: meitar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,900 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▼0.59MB] [CPU: ▼16.59ms] Passed 4 tests

An overview of server-side resources used by WP-Seedbank
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1344.43 ▲2.59
Dashboard /wp-admin3.41 ▲0.1147.79 ▼4.45
Posts /wp-admin/edit.php3.48 ▲0.1252.26 ▲3.93
Add New Post /wp-admin/post-new.php3.20 ▼2.6936.35 ▼68.43
Media Library /wp-admin/upload.php3.33 ▲0.1044.62 ▲9.98
Seed Exchanges /wp-admin/edit.php?post_type=seedbank3.4541.07
Batch Exchange /wp-admin/edit.php?post_type=seedbank&page=seedbank_batch_exchange3.2832.66
Scientific Names /wp-admin/edit-tags.php?taxonomy=seedbank_scientific_name&post_type=seedbank3.5852.59
Add Seed Exchange /wp-admin/post-new.php?post_type=seedbank3.2137.59
Exchange Types /wp-admin/edit-tags.php?taxonomy=seedbank_exchange_type&post_type=seedbank3.3441.66
Common Names /wp-admin/edit-tags.php?taxonomy=seedbank_common_name&post_type=seedbank3.3649.00
Inventory Units /wp-admin/edit-tags.php?taxonomy=seedbank_unit&post_type=seedbank3.3438.85

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 17 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded
seedbank_scientific_name_children

Browser metrics Passed 4 tests

Checking browser requirements for WP-Seedbank
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲8114.03 ▼0.321.71 ▼0.0740.73 ▲1.31
Dashboard /wp-admin2,245 ▲655.56 ▼0.0783.76 ▼11.9484.84 ▲46.61
Posts /wp-admin/edit.php2,150 ▲502.03 ▲0.0138.11 ▼0.2034.08 ▼2.77
Add New Post /wp-admin/post-new.php1,592 ▲6623.06 ▼0.44653.43 ▲17.5454.92 ▲3.10
Media Library /wp-admin/upload.php1,447 ▲474.11 ▼0.0898.33 ▼12.5666.38 ▲17.18
Seed Exchanges /wp-admin/edit.php?post_type=seedbank1,3542.0847.7938.35
Batch Exchange /wp-admin/edit.php?post_type=seedbank&page=seedbank_batch_exchange1,1381.9333.2928.69
Scientific Names /wp-admin/edit-tags.php?taxonomy=seedbank_scientific_name&post_type=seedbank3,0811.8830.0746.65
Add Seed Exchange /wp-admin/post-new.php?post_type=seedbank4,8247.99190.06134.56
Exchange Types /wp-admin/edit-tags.php?taxonomy=seedbank_exchange_type&post_type=seedbank1,5531.8728.4535.70
Common Names /wp-admin/edit-tags.php?taxonomy=seedbank_common_name&post_type=seedbank2,3261.8829.4537.44
Inventory Units /wp-admin/edit-tags.php?taxonomy=seedbank_unit&post_type=seedbank1,4191.8628.1534.87

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options were found after uninstall: 7 options
    • seedbank_scientific_name_children
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
    • > GET request to /wp-admin/edit.php?post_type=seedbank&page=seedbank_batch_exchange
    • > Notice in wp-content/plugins/wp-seedbank/wp-seedbank.php+1241
    Undefined index: seedbank-batch-exchange-step
    • > GET request to /wp-admin/post-new.php?post_type=seedbank
    • > Notice in wp-content/plugins/wp-seedbank/wp-seedbank.php+387
    Undefined index: post_type

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wp-seedbank/languages/index.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/wp-seedbank/wp-seedbank.php:33

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% 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
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (The new Seed Exchange request/offer screen. In addition to your post title and content, you use the "Seed Exchange Details" box to fill in the details of your seed exchange posting in a madlibs-style form. You can also use the "Scientific Names" box to categorize your seed according to its biological classification, if you know it.), #2 (The Batch Exchange page lets you upload a file to create many seed exchanges at once.), #3 (The "Seed Exchanges" screen gives you a heads-up display of all the seed exchange postings. You can click on the links in the column to filter your view; in this screenshot, clicking on "Swap" in the "Exchange Types" link will filter the list so it only displays seed swaps. You can also sort the list according to the Quantity, Seed Expiry Date, or Exchange Expiry Date by clicking on those column headers.)
The official readme.txt might help

wp-seedbank/wp-seedbank.php Passed 13 tests

The primary PHP file in "WP-Seedbank" version 0.4.4 is used by WordPress to initiate all plugin functionality
106 characters long description:
Add a seed exchange post type to turn your WordPress website into a community seedbank or seed library! :D

Code Analysis 97% from 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 plugin3,833 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PO File31,0831,1252,451
PHP3951241,279
JavaScript174103

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
The following items need your attention
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 101)
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity87.00
▷ Minimum class complexity3.00
▷ Maximum class complexity171.00
Average method complexity5.78
▷ Minimum method complexity1.00
▷ Maximum method complexity101.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods36
▷ Static methods00.00%
▷ Public methods2672.22%
▷ Protected methods00.00%
▷ Private methods1027.78%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.29MB with 0.18MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png110.68KB42.20KB▼ 61.87%
images/seedexchange_icon.png1.10KB0.46KB▼ 57.97%
screenshot-2.png64.68KB25.48KB▼ 60.60%
screenshot-3.png119.47KB43.91KB▼ 63.25%