84% clerkio

Code Review | Clerk

WordPress plugin Clerk scored84%from 54 tests.

About plugin

  • Plugin page: clerkio
  • Plugin version: 4.1.4
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: May 10, 2017
  • Latest release: Nov 30, 2023
  • Number of updates: 167
  • Update frequency: every 14.4 days
  • Top authors: clerkio (74.85%)rbech (25.75%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /9,909 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.25MB] [CPU: ▼11.53ms] Passed 4 tests

Analyzing server-side resources used by Clerk
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.38 ▲0.9246.06 ▲7.62
Dashboard /wp-admin4.28 ▲0.9852.16 ▲4.97
Posts /wp-admin/edit.php4.34 ▲0.9854.49 ▲0.72
Add New Post /wp-admin/post-new.php4.07 ▼1.8243.08 ▼53.78
Media Library /wp-admin/upload.php4.15 ▲0.9239.96 ▲1.98

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 49 new files
Database: no new tables, 9 new options
New WordPress options
widget_clerk_search
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_clerk_content
recovery_mode_email_last_sent
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Clerk
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲5914.76 ▲0.031.68 ▲0.0840.50 ▼3.57
Dashboard /wp-admin2,229 ▲525.81 ▲0.1895.17 ▼1.9393.89 ▲52.30
Posts /wp-admin/edit.php2,136 ▲332.49 ▲0.5539.45 ▼5.4536.59 ▼1.30
Add New Post /wp-admin/post-new.php45 ▼1,4810.41 ▼22.630.10 ▼672.439.76 ▼49.81
Media Library /wp-admin/upload.php1,431 ▲314.46 ▲0.38108.70 ▲8.5690.70 ▲50.14

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: 9 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_clerk_content
    • widget_recent-comments
    • widget_clerk_search
    • recovery_mode_email_last_sent
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/clerkio/includes/class-clerk-content.php:35
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/clerkio/includes/widgets/class-clerk-widget-content.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/clerkio/includes/widgets/class-clerk-widget-search.php:22

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 93% from 29 tests

readme.txt Passed 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
7 plugin tags: sales optimisation, product recommendations, semantic search, customer conversion, customer segmentation...

clerkio/class-clerk.php 85% from 13 tests

The main PHP script in "Clerk" version 4.1.4 is automatically included on every request by WordPress
It is important to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("clerkio.php" instead of "class-clerk.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected6,988 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
PHP221,2741,3635,804
PO File5278392643
JavaScript34855272
CSS2240188
XML10079
Markdown1002

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity51.47
▷ Minimum class complexity2.00
▷ Maximum class complexity246.00
Average method complexity5.39
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods133
▷ Static methods00.00%
▷ Public methods10175.94%
▷ Protected methods00.00%
▷ Private methods3224.06%
Functions20
▷ Named functions1575.00%
▷ Anonymous functions525.00%
Constants3
▷ Global constants133.33%
▷ Class constants266.67%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/clerk.png0.48KB0.48KB0.00%