10% equity-disclosure

Code Review | Equity Disclosure

WordPress plugin Equity Disclosure scored10%from 54 tests.

About plugin

  • Plugin page: equity-disclosure
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.2-3.5.2
  • WordPress version: 6.3.1
  • First release: Jun 7, 2013
  • Latest release: Jun 7, 2013
  • Number of updates: 14
  • Update frequency: N/A
  • Top authors: ianmattroseman (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /826 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/equity-disclosure/EquityDisclosure.php+236
    Methods with the same name as their class will not be constructors in a future version of PHP; EquityDisclosureWidget has a deprecated constructor

Server metrics [RAM: ▼1.89MB] [CPU: ▼54.16ms] Passed 4 tests

An overview of server-side resources used by Equity Disclosure
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.10 ▼1.364.24 ▼37.16
Dashboard /wp-admin2.12 ▼1.186.66 ▼41.37
Posts /wp-admin/edit.php2.12 ▼1.245.50 ▼45.35
Add New Post /wp-admin/post-new.php2.12 ▼3.775.55 ▼92.77
Media Library /wp-admin/upload.php2.12 ▼1.115.50 ▼29.21

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 10 new files
Database: 1 new table, 7 new options
New tables
disclosures
New WordPress options
widget_theysaidso_widget
widget_equity_disclosure_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Equity Disclosure
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲5113.70 ▼0.681.69 ▼0.3039.20 ▼1.01
Dashboard /wp-admin2,223 ▲324.89 ▼1.19109.97 ▲8.0441.68 ▼2.15
Posts /wp-admin/edit.php2,112 ▲202.05 ▲0.0441.95 ▲2.7635.24 ▼0.27
Add New Post /wp-admin/post-new.php1,533 ▲12023.21 ▲5.30639.97 ▲62.0153.62 ▲2.37
Media Library /wp-admin/upload.php1,411 ▲234.21 ▲0.04103.14 ▼2.3643.45 ▲0.63

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/equity-disclosure/EquityDisclosure.php+236
    Methods with the same name as their class will not be constructors in a future version of PHP; EquityDisclosureWidget has a deprecated constructor
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_equity_disclosure_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 items
  • 1× 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/equity-disclosure/EquityDisclosure.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (screenshot-1.png), #2 (screenshot-2.png)
The official readme.txt is a good inspiration

equity-disclosure/EquityDisclosure.php 92% from 13 tests

"Equity Disclosure" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("equity-disclosure.php" instead of "EquityDisclosure.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 detected682 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP1337273
CSS2340225
JavaScript1160167
XML10017

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity5.00
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png44.05KB18.56KB▼ 57.88%
screenshot-2.png3.30KB2.00KB▼ 39.41%