83% simple-attribution

Code Review | Simple Attribution

WordPress plugin Simple Attribution scored 83% from 54 tests.

About plugin

  • Plugin page: simple-attribution
  • Plugin version: 2.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.4.1
  • WordPress version: 6.3.1
  • First release: Jul 13, 2012
  • Latest release: May 29, 2020
  • Number of updates: 25
  • Update frequency: every 115.1 days
  • Top authors: evertiro (56%)ghost1227 (36%)section214 (16%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active / 11,819 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.48MB] [CPU: ▼3.72ms] Passed 4 tests

A check of server-side resources used by Simple Attribution
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.90 ▲0.4340.10 ▲1.35
Dashboard /wp-admin3.81 ▲0.5049.46 ▼4.43
Posts /wp-admin/edit.php3.92 ▲0.5654.11 ▲2.12
Add New Post /wp-admin/post-new.php6.39 ▲0.5090.59 ▼11.48
Media Library /wp-admin/upload.php3.73 ▲0.5036.18 ▼0.31
Simple Attribution /wp-admin/options-general.php?page=simple_attribution-settings3.7452.98

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 42 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
simple_attribution_settings
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Simple Attribution
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7113.32 ▼1.075.07 ▲3.0438.86 ▼4.83
Dashboard /wp-admin2,210 ▲224.81 ▼0.07107.84 ▲0.8138.86 ▼9.79
Posts /wp-admin/edit.php2,093 ▼32.01 ▼0.0541.33 ▲0.8433.90 ▼2.12
Add New Post /wp-admin/post-new.php6,481 ▲4,96720.53 ▲3.04926.57 ▲275.9659.37 ▲2.95
Media Library /wp-admin/upload.php1,392 ▲44.25 ▲0.0994.18 ▼11.7640.82 ▼3.36
Simple Attribution /wp-admin/options-general.php?page=simple_attribution-settings1,1435.53110.4037.79

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • simple_attribution_settings
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Congratulations! This plugin passed the SRP test

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following user-side errors
    • > GET request to /wp-admin/options-general.php?page=simple_attribution-settings
    • > Network (severe)
    wp-content/plugins/simple-attribution/assets/css/admin.min.css?ver=2.1.2 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: cite, attribution, post, citation, link

simple-attribution/class-simple-attribution.php 77% from 13 tests

This is the main PHP file of "Simple Attribution" version 2.1.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Domain Path: The domain path should use only dashes and lowercase characters ("languages")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("simple-attribution.php" instead of "class-simple-attribution.php")
  • Domain Path: The domain path should be prefixed with a forward slash character ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin10,954 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
JSON1008,074
PHP111,0542,0012,528
JavaScript43018162
CSS61710100
Markdown443090

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity74.33
▷ Minimum class complexity11.00
▷ Maximum class complexity162.00
Average method complexity4.38
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods130
▷ Static methods10.77%
▷ Public methods11890.77%
▷ Protected methods21.54%
▷ Private methods107.69%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
10 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/globe-1-light.png1.01KB0.97KB▼ 4.23%
assets/images/globe-1.png2.12KB0.97KB▼ 54.08%
assets/images/clip.png1.96KB0.94KB▼ 52.15%
assets/images/quote-light.png0.52KB0.52KB0.00%
assets/images/globe-2-light.png0.88KB0.83KB▼ 5.02%