89% collection

Code Review | Collection

WordPress plugin Collection scored89%from 54 tests.

About plugin

  • Plugin page: collection
  • Plugin version: 0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7
  • WordPress version: 6.3.1
  • First release: Apr 9, 2017
  • Latest release: Apr 26, 2017
  • Number of updates: 18
  • Update frequency: every 0.9 days
  • Top authors: webstartup (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,118 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.03MB] [CPU: ▼7.70ms] Passed 4 tests

Server-side resources used by Collection
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.69 ▲0.27
Dashboard /wp-admin3.35 ▲0.0046.63 ▼14.46
Posts /wp-admin/edit.php3.40 ▲0.0447.08 ▼0.83
Add New Post /wp-admin/post-new.php5.93 ▲0.0480.39 ▼14.49
Media Library /wp-admin/upload.php3.27 ▲0.0437.20 ▼1.03

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 17 new options
New WordPress options
slwsu_collection_flush_rewrite
db_upgraded
slwsu_collection_post_type_deregister
slwsu_collection_delete_options
slwsu_collection_metaboxs
slwsu_collection_post_types
widget_recent-posts
widget_recent-comments
slwsu_collection_post_type_supports
slwsu_collection_add_body_class
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Collection
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,813 ▲4214.30 ▼0.331.81 ▼0.0245.60 ▲2.47
Dashboard /wp-admin2,214 ▲465.58 ▼0.0084.15 ▼4.4638.22 ▼5.20
Posts /wp-admin/edit.php2,122 ▲222.00 ▲0.0535.48 ▼0.2935.04 ▼0.08
Add New Post /wp-admin/post-new.php1,545 ▲1923.09 ▲0.03657.53 ▲4.7252.11 ▲5.72
Media Library /wp-admin/upload.php1,416 ▲194.22 ▼0.0094.26 ▼17.2248.53 ▲0.41

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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: Please delete some tags, you are using 13 tag instead of maximum 10
  • Screenshots: Please add images for these screenshots: #1 (Add a collection), #2 (Your collection is created), #3 (Add metabox), #4 (Configure the position of the metabox), #5 (Add fields to the metabox), #6 (You have a new type of article), #7 (Add a new article), #8 (Fill in the fields of the article correctly), #9 (Fill in the metabox fields), #10 (You can see a normal item), #11 (The plugin generates the shortcode created by the metabox), #12 (Add the shortcode for a specific field), #13 (The value is injected into the article), #14 (Add a shortcode for a list or for all the fields), #15 (View the article, the list is generated in a html table)
You can take inspiration from this readme.txt

collection/collection.php 92% from 13 tests

The principal PHP file in "Collection" v. 0.5 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; 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
No dangerous file extensions were detected1,856 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP142823191,455
PO File1106120236
CSS1200165

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity10.46
▷ Minimum class complexity1.00
▷ Maximum class complexity61.00
Average method complexity2.48
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods83
▷ Static methods1720.48%
▷ Public methods7387.95%
▷ Protected methods00.00%
▷ Private methods1012.05%
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
No PNG files were detected