78% simple-references

Code Review | Simple References

WordPress plugin Simple References scored78%from 54 tests.

About plugin

  • Plugin page: simple-references
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.5
  • WordPress version: 6.3.1
  • First release: Dec 21, 2012
  • Latest release: Dec 21, 2012
  • Number of updates: 4
  • Update frequency: every 3.8 days
  • Top authors: FunAndProg (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,119 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼4.69ms] Passed 4 tests

This is a short check of server-side resources used by Simple References
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0735.73 ▼9.79
Dashboard /wp-admin3.37 ▲0.0744.35 ▼3.96
Posts /wp-admin/edit.php3.42 ▲0.0748.83 ▲2.42
Add New Post /wp-admin/post-new.php5.95 ▲0.0780.13 ▼6.71
Media Library /wp-admin/upload.php3.29 ▲0.0734.73 ▲1.71
References /wp-admin/edit.php?post_type=fnp_references3.3434.17
Add New /wp-admin/post-new.php?post_type=fnp_references3.4141.33

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Simple References
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,943 ▲20813.57 ▼0.818.19 ▲6.4039.74 ▼2.87
Dashboard /wp-admin2,233 ▲485.82 ▼0.08108.20 ▲3.9374.21 ▲28.62
Posts /wp-admin/edit.php2,116 ▲272.00 ▲0.0338.28 ▲2.8936.51 ▼0.14
Add New Post /wp-admin/post-new.php1,702 ▲18824.63 ▲7.04694.51 ▼3.7567.45 ▲10.48
Media Library /wp-admin/upload.php1,421 ▲364.22 ▲0.02111.35 ▲10.6244.47 ▼3.74
Options /wp-admin/simple_references.php260.440.0614.00
References /wp-admin/edit.php?post_type=fnp_references1,0831.9333.1429.86
Add New /wp-admin/post-new.php?post_type=fnp_references2,2087.73174.15110.33

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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

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
Good news, no errors were detected

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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-references/simple_references.php:13

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
    • > GET request to /wp-admin/simple_references.php
    • > Network (severe)
    wp-admin/simple_references.php - Failed to load resource: the server responded with a status of 404 (Not Found)

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
Please fix the following attributes:
  • Contributors: The plugin contributors field is not present
Please take inspiration from this readme.txt

simple-references/simple_references.php 92% from 13 tests

"Simple References" version 0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("simple-references.php" instead of "simple_references.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected1,502 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP31551551,324
CSS24424161
JavaScript21912
SVG1005

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity206.00
▷ Minimum class complexity206.00
▷ Maximum class complexity206.00
Average method complexity6.86
▷ Minimum method complexity1.00
▷ Maximum method complexity65.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods35
▷ Static methods38.57%
▷ Public methods514.29%
▷ Protected methods3085.71%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants49
▷ Global constants49100.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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/controls.png2.74KB1.42KB▼ 48.29%
images/icon-clients_light.png2.53KB1.13KB▼ 55.39%