84% dp-addthis

Code Review | (dp) AddThis

WordPress plugin (dp) AddThis scored84%from 54 tests.

About plugin

  • Plugin page: dp-addthis
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.4
  • WordPress version: 6.3.1
  • First release: Dec 14, 2015
  • Latest release: Dec 15, 2015
  • Number of updates: 11
  • Update frequency: every 0.1 days
  • Top authors: demixpress (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,382 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼0.51ms] Passed 4 tests

A check of server-side resources used by (dp) AddThis
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.28 ▲1.35
Dashboard /wp-admin3.33 ▲0.0344.19 ▼2.05
Posts /wp-admin/edit.php3.38 ▲0.0348.61 ▲0.99
Add New Post /wp-admin/post-new.php5.91 ▲0.0388.80 ▼0.09
Media Library /wp-admin/upload.php3.26 ▲0.0332.28 ▼0.89
(dp) Addthis /wp-admin/options-general.php?page=dp-addthis3.2333.40

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
dp_addthis_config
widget_recent-comments
dp_addthis_custom_css
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for (dp) AddThis
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8314.73 ▲0.351.85 ▲0.1043.34 ▲1.47
Dashboard /wp-admin2,210 ▲224.87 ▼0.01108.94 ▲4.4142.98 ▼0.06
Posts /wp-admin/edit.php2,093 ▲42.00 ▼0.0539.60 ▲5.0734.91 ▲0.22
Add New Post /wp-admin/post-new.php1,550 ▲2218.60 ▲0.16587.86 ▼75.6661.09 ▲7.17
Media Library /wp-admin/upload.php1,392 ▲74.21 ▲0.0894.69 ▼40.3441.89 ▼11.67
(dp) Addthis /wp-admin/options-general.php?page=dp-addthis1,1512.3652.4033.49

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
  • Zombie WordPress options were found after uninstall: 8 options
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • dp_addthis_custom_css
    • can_compress_scripts
    • widget_theysaidso_widget
    • dp_addthis_config

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
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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/dp-addthis/dp-addthis.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === dp-addthis === )
The official readme.txt might help

dp-addthis/dp-addthis.php Passed 13 tests

"(dp) AddThis" version 1.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
137 characters long description:
Makes it even easier and better to display AddThis tools (share buttons, follow buttons and recommended contents) on your WordPress site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin878 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2178172860
JavaScript14018

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity17.67
▷ Minimum class complexity10.00
▷ Maximum class complexity24.00
Average method complexity2.56
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods32
▷ Static methods00.00%
▷ Public methods32100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.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
PNG images were not found in this plugin