84% select2-post-selector

Code Review | Select 2 Post Selector

WordPress plugin Select 2 Post Selector scored 84% from 54 tests.

About plugin

  • Plugin page: select2-post-sele...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.1
  • WordPress version: 6.3.1
  • First release: Jan 31, 2015
  • Latest release: Apr 22, 2019
  • Number of updates: 10
  • Update frequency: every 154.2 days
  • Top authors: magicroundabout (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active / 4,104 total downloads

Benchmarks

Plugin footprint 83% 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: ▲0.01MB] [CPU: ▼4.88ms] Passed 4 tests

A check of server-side resources used by Select 2 Post Selector
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.26 ▼6.40
Dashboard /wp-admin3.31 ▲0.0149.30 ▼0.62
Posts /wp-admin/edit.php3.36 ▲0.0150.12 ▼0.89
Add New Post /wp-admin/post-new.php5.91 ▲0.0385.83 ▼11.51
Media Library /wp-admin/upload.php3.23 ▲0.0135.95 ▼0.71

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 67 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Select 2 Post Selector
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲3513.33 ▼0.931.70 ▼0.1638.64 ▼2.11
Dashboard /wp-admin2,212 ▲215.13 ▲0.25108.46 ▼3.9040.16 ▼4.25
Posts /wp-admin/edit.php2,095 ▲62.46 ▲0.4140.68 ▼1.3634.61 ▼0.05
Add New Post /wp-admin/post-new.php1,520 ▼823.10 ▲4.62594.63 ▼5.1056.78 ▼1.84
Media Library /wp-admin/upload.php1,391 ▲34.36 ▲0.1695.27 ▼8.0642.23 ▼1.53

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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
Please take a closer look at the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/select2-post-selector/demo.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/select2-post-selector/select2-post-selector.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Screenshots: Please add an image for screenshot #1 ()
You can take inspiration from this readme.txt

select2-post-selector/select2-post-selector.php 92% from 13 tests

The entry point to "Select 2 Post Selector" version 1.0.3 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Domain Path: The domain path folder was not found ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin4,322 lines of code in 59 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript476066063,226
CSS213719631
PHP35277179
JSON500159
Markdown127072
Bourne Shell124055

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity12.00
▷ Minimum class complexity8.00
▷ Maximum class complexity16.00
Average method complexity3.10
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods11
▷ Static methods763.64%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/select2-3.5.0/select2.png0.60KB0.99KB0.00%
includes/select2-3.5.0/select2x2.png0.83KB0.77KB▼ 6.15%