10% jreferences

Code Review | JReferences

WordPress plugin JReferences scored 10% from 54 tests.

About plugin

  • Plugin page: jreferences
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.0.2
  • WordPress version: 6.3.1
  • First release: Feb 6, 2017
  • Latest release: Jan 2, 2019
  • Number of updates: 18
  • Update frequency: every 38.6 days
  • Top authors: janiko (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 982 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • Install procedure had errors
    • > Notice in wp-content/plugins/jreferences/class.jref-citation.php+189
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼0.32MB] [CPU: ▼11.28ms] Passed 4 tests

A check of server-side resources used by JReferences
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.43 ▼0.0350.76 ▲0.14
Dashboard /wp-admin3.32 ▲0.0257.96 ▲3.73
Posts /wp-admin/edit.php3.37 ▲0.0252.50 ▼3.10
Add New Post /wp-admin/post-new.php4.61 ▼1.2748.94 ▼42.82
Media Library /wp-admin/upload.php3.25 ▲0.0238.91 ▲0.68
JREF References /wp-admin/options-general.php?page=jref-setting-admin3.2133.33

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
jref_option_name

Browser metrics Passed 4 tests

A check of browser resources used by JReferences
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲1713.32 ▼1.465.69 ▲3.7148.35 ▲7.45
Dashboard /wp-admin2,210 ▲74.87 ▼1.02112.98 ▲9.5649.44 ▲7.33
Posts /wp-admin/edit.php2,093 ▲11.99 ▼0.0636.54 ▼2.6532.55 ▼4.19
Add New Post /wp-admin/post-new.php1,536 ▲322.74 ▼0.22661.23 ▲3.4356.97 ▼10.46
Media Library /wp-admin/upload.php1,389 ▲14.21 ▲0.0196.03 ▼4.8444.08 ▲2.09
JREF References /wp-admin/options-general.php?page=jref-setting-admin8112.1725.8537.93

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • jref_option_name

Smoke tests 50% 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 no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/jreferences/class.jref-reference.php
    • > /wp-content/plugins/jreferences/jref.php
    • > /wp-content/plugins/jreferences/class.jref-citation.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/jreferences/class.jref-admin.php:158

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

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 require attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === jreferences === )
You can look at the official readme.txt

jreferences/jref.php 92% from 13 tests

The principal PHP file in "JReferences" v. 1.0.3 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("jreferences.php" instead of "jref.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin394 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP4122183331
PO File1131742
CSS17021

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity9.75
▷ Minimum class complexity2.00
▷ Maximum class complexity23.00
Average method complexity2.35
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods27
▷ Static methods00.00%
▷ Public methods27100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png7.45KB5.12KB▼ 31.28%