78% db-signatures

Code Review | DB Signatures

WordPress plugin DB Signatures scored78%from 54 tests.

About plugin

  • Plugin page: db-signatures
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.8.1
  • WordPress version: 6.3.1
  • First release: Feb 9, 2014
  • Latest release: Feb 9, 2014
  • Number of updates: 6
  • Update frequency: every 0.2 days
  • Top authors: dbeja (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,159 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.08MB] [CPU: ▼4.09ms] Passed 4 tests

An overview of server-side resources used by DB Signatures
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0842.93 ▲0.13
Dashboard /wp-admin3.38 ▲0.0847.56 ▼2.74
Posts /wp-admin/edit.php3.49 ▲0.1450.34 ▲2.82
Add New Post /wp-admin/post-new.php5.97 ▲0.0885.39 ▼9.67
Media Library /wp-admin/upload.php3.30 ▲0.0736.45 ▼4.07
Add New /wp-admin/post-new.php?post_type=db-signatures3.4355.81
Help /wp-admin/edit.php?post_type=db-signatures&page=db-signatures-help3.2740.21
All Signatures /wp-admin/edit.php?post_type=db-signatures3.3538.92

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for DB Signatures
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲9813.27 ▼1.481.69 ▼0.1343.94 ▼2.45
Dashboard /wp-admin2,239 ▲545.83 ▼0.02107.34 ▲0.7869.48 ▲26.62
Posts /wp-admin/edit.php2,125 ▲362.04 ▲0.0437.02 ▼2.8134.83 ▼2.46
Add New Post /wp-admin/post-new.php6,487 ▲4,94528.58 ▲10.56958.04 ▲322.7557.16 ▲5.00
Media Library /wp-admin/upload.php1,418 ▲304.21 ▲0.0295.53 ▼14.8274.52 ▲33.55
Add New /wp-admin/post-new.php?post_type=db-signatures2,3967.67191.72141.96
Help /wp-admin/edit.php?post_type=db-signatures&page=db-signatures-help8642.0224.5926.07
All Signatures /wp-admin/edit.php?post_type=db-signatures1,1291.9531.3529.70

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

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
Please fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/db-signatures/templates/show_signature.php
    • > /wp-content/plugins/db-signatures/templates/help_page.php
  • 8× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/db-signatures/db-signatures.php:217
    • > PHP Notice
      Undefined variable: post_types in wp-content/plugins/db-signatures/templates/meta_box_show_on.php on line 1
    • > PHP Notice
      Undefined variable: signature_selected in wp-content/plugins/db-signatures/templates/meta_box_choose_signature.php on line 4
    • > PHP Notice
      Undefined variable: signatures in wp-content/plugins/db-signatures/templates/meta_box_choose_signature.php on line 6
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/db-signatures/templates/meta_box_show_on.php on line 1
    • > PHP Notice
      Undefined variable: signature_selected in wp-content/plugins/db-signatures/templates/meta_box_choose_signature.php on line 3
    • > PHP Notice
      Undefined variable: signature_contents in wp-content/plugins/db-signatures/templates/show_signature.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to a member function have_posts() on null in wp-content/plugins/db-signatures/templates/meta_box_choose_signature.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
Attributes that require attention:
  • Tags: There are too many tags (14 tag instead of maximum 10)
The official readme.txt is a good inspiration

db-signatures/db-signatures.php Passed 13 tests

This is the main PHP file of "DB Signatures" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
80 characters long description:
Add some HTML content to the bottom of every posts, pages and custom post types.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected263 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP6126121263

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity13.00
▷ Minimum class complexity11.00
▷ Maximum class complexity15.00
Average method complexity2.14
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods21
▷ Static methods29.52%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/icon_post_type.png2.96KB0.37KB▼ 87.64%