84% codedropz-filter-profile-directory

Code Review | Profile Directory - Filter

WordPress plugin Profile Directory - Filter scored84%from 54 tests.

About plugin

  • Plugin page: codedropz-filter-...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.0.4
  • WordPress version: 6.3.1
  • First release: Oct 9, 2018
  • Latest release: Aug 23, 2019
  • Number of updates: 9
  • Update frequency: every 35.4 days
  • Top authors: glenwpcoder (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /744 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼7.23ms] Passed 4 tests

Server-side resources used by Profile Directory - Filter
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0438.65 ▼1.72
Dashboard /wp-admin3.34 ▲0.0446.54 ▼5.18
Posts /wp-admin/edit.php3.46 ▲0.1044.13 ▼4.70
Add New Post /wp-admin/post-new.php5.93 ▲0.0481.14 ▼17.32
Media Library /wp-admin/upload.php3.27 ▲0.0434.57 ▲0.14
Add New /wp-admin/post-new.php?post_type=pdfi-profile3.3747.56
Settings /wp-admin/edit.php?post_type=pdfi-profile&page=pdfi-settings3.2328.39
All Profile /wp-admin/edit.php?post_type=pdfi-profile3.3133.17

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 19 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts
pdfi_options

Browser metrics Passed 4 tests

A check of browser resources used by Profile Directory - Filter
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,920 ▲17413.59 ▼0.709.79 ▲7.9342.32 ▼2.83
Dashboard /wp-admin2,237 ▲524.81 ▼0.07114.14 ▼2.2341.45 ▼5.56
Posts /wp-admin/edit.php2,119 ▲302.02 ▲0.0234.57 ▲0.4735.65 ▲0.95
Add New Post /wp-admin/post-new.php1,572 ▲5522.88 ▼0.68668.00 ▼0.8556.80 ▼6.67
Media Library /wp-admin/upload.php1,419 ▲314.19 ▲0.0297.41 ▼1.3445.54 ▲3.15
Add New /wp-admin/post-new.php?post_type=pdfi-profile2,2037.18152.2667.16
Settings /wp-admin/edit.php?post_type=pdfi-profile&page=pdfi-settings9692.0625.1628.65
All Profile /wp-admin/edit.php?post_type=pdfi-profile1,0861.9629.6730.24

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/codedropz-filter-profile-directory/templates/modal-content.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function pdfi_directory_class() in wp-content/plugins/codedropz-filter-profile-directory/templates/bootstrap-layout.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function pdfi_directory_class() in wp-content/plugins/codedropz-filter-profile-directory/templates/default-layout.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Contributors: The plugin contributors field is not present
You can look at the official readme.txt

codedropz-filter-profile-directory/profile-directory-filter.php 92% from 13 tests

The principal PHP file in "Profile Directory - Filter" v. 1.0.1 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 ("codedropz-filter-profile-directory.php" instead of "profile-directory-filter.php")

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,023 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12265320712
CSS23429187
JavaScript1332995
Markdown116029

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity13.00
▷ Minimum class complexity1.00
▷ Maximum class complexity33.00
Average method complexity4.27
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods11
▷ Static methods327.27%
▷ Public methods872.73%
▷ Protected methods00.00%
▷ Private methods327.27%
Functions24
▷ Named functions24100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/arrow-right.png4.02KB0.35KB▼ 91.41%