84% calj

Code Review | CalJ

WordPress plugin CalJ scored84%from 54 tests.

About plugin

  • Plugin page: calj
  • Plugin version: 1.4.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.3
  • WordPress version: 6.3.1
  • First release: Jan 20, 2016
  • Latest release: Jul 23, 2023
  • Number of updates: 27
  • Update frequency: every 101.6 days
  • Top authors: calj (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /2,397 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.04MB] [CPU: ▼5.20ms] Passed 4 tests

A check of server-side resources used by CalJ
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0543.21 ▼2.12
Dashboard /wp-admin3.36 ▲0.0251.29 ▼15.80
Posts /wp-admin/edit.php3.48 ▲0.1251.80 ▲0.70
Add New Post /wp-admin/post-new.php5.94 ▲0.0693.95 ▼3.57
Media Library /wp-admin/upload.php3.29 ▲0.0639.24 ▲0.80
CalJ /wp-admin/options-general.php?page=calj-setting3.2534.71

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for CalJ
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.25 ▼0.281.68 ▼0.3341.57 ▼3.79
Dashboard /wp-admin2,202 ▲255.59 ▼0.0889.78 ▼10.3438.82 ▼3.90
Posts /wp-admin/edit.php2,104 ▲12.03 ▲0.0333.43 ▼1.2835.40 ▼0.08
Add New Post /wp-admin/post-new.php1,529 ▲123.57 ▲0.60642.20 ▼56.9955.01 ▲3.45
Media Library /wp-admin/upload.php1,401 ▲44.12 ▲0.0197.89 ▼19.1144.09 ▼3.47
CalJ /wp-admin/options-general.php?page=calj-setting8092.2027.6930.15

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • 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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function calj\\wordpress\\is_admin() in wp-content/plugins/calj/calj.php:17

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: events, calendar, shortcode, date, hebrew...

calj/calj.php Passed 13 tests

"CalJ" version 1.4.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
35 characters long description:
Add the Shabbat times on your site.

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 plugin315 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP46851315

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity19.00
▷ Minimum class complexity7.00
▷ Maximum class complexity31.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods16
▷ Static methods212.50%
▷ Public methods1168.75%
▷ Protected methods00.00%
▷ Private methods531.25%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin