90% library

Code Review | Library

WordPress plugin Library scored90%from 54 tests.

About plugin

  • Plugin page: library
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.1-4.4
  • WordPress version: 6.3.1
  • First release: Mar 6, 2014
  • Latest release: Dec 31, 2015
  • Number of updates: 9
  • Update frequency: every 74.0 days
  • Top authors: Developdaly (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /2,958 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.05MB] [CPU: ▲2.04ms] Passed 4 tests

A check of server-side resources used by Library
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0142.50 ▼0.22
Dashboard /wp-admin3.37 ▲0.0657.97 ▲6.14
Posts /wp-admin/edit.php3.42 ▲0.0653.38 ▲4.02
Add New Post /wp-admin/post-new.php5.95 ▲0.0689.79 ▲1.10
Media Library /wp-admin/upload.php3.29 ▲0.0638.64 ▲3.24
Add New /wp-admin/post-new.php?post_type=library_term3.4048.23
Library /wp-admin/edit.php?post_type=library_term3.3342.32

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Library
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,841 ▲8014.35 ▼0.212.20 ▲0.6044.51 ▼3.93
Dashboard /wp-admin2,225 ▲485.63 ▼0.0183.24 ▼8.4040.97 ▲3.09
Posts /wp-admin/edit.php2,169 ▲691.98 ▼0.0238.60 ▲2.8336.75 ▼1.36
Add New Post /wp-admin/post-new.php1,591 ▲6323.15 ▲0.12687.19 ▼2.4558.39 ▼4.75
Media Library /wp-admin/upload.php1,427 ▲304.09 ▼0.12113.69 ▼6.2847.66 ▼0.24
Add New /wp-admin/post-new.php?post_type=library_term2,1687.69167.3567.88
Library /wp-admin/edit.php?post_type=library_term1,0881.9831.5430.23

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
6 plugin tags: shortcodes, library, wp-strings, dictionary, strings...

library/library.php Passed 13 tests

The main file in "Library" v. 1.1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
111 characters long description:
Create a library of reusable terms (strings) and display their contents anywhere on your site with a shortcode.

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 plugin202 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP573207202

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity6.50
▷ Minimum class complexity4.00
▷ Maximum class complexity9.00
Average method complexity1.79
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods428.57%
▷ Public methods1285.71%
▷ Protected methods00.00%
▷ Private methods214.29%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected