84% wp-share

Code Review | WP Share

WordPress plugin WP Share scored84%from 54 tests.

About plugin

  • Plugin page: wp-share
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-3.9
  • WordPress version: 6.3.1
  • First release: Apr 21, 2014
  • Latest release: Apr 21, 2014
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: alex.i (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,634 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▲0.90ms] Passed 4 tests

Analyzing server-side resources used by WP Share
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.18 ▼2.25
Dashboard /wp-admin3.34 ▲0.0455.28 ▲2.76
Posts /wp-admin/edit.php3.39 ▲0.0353.38 ▲1.60
Add New Post /wp-admin/post-new.php5.93 ▲0.04120.52 ▲25.75
Media Library /wp-admin/upload.php3.26 ▲0.0340.40 ▲1.50
General /wp-admin/admin.php?page=share-options3.2534.23
WP Share /wp-admin/options-general.php?page=wp-share3.2336.59

Server storage [IO: ▲0.46MB] [DB: ▲0.80MB] Passed 3 tests

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 30 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Share
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,902 ▲14113.88 ▼0.466.18 ▲3.8242.04 ▼5.07
Dashboard /wp-admin2,228 ▲585.85 ▲0.29118.32 ▲9.3743.60 ▲1.66
Posts /wp-admin/edit.php2,104 ▲12.01 ▼0.0343.12 ▼2.2036.81 ▼1.39
Add New Post /wp-admin/post-new.php6,241 ▲4,71025.90 ▲2.84952.82 ▲336.9071.22 ▲14.92
Media Library /wp-admin/upload.php1,404 ▲14.20 ▼0.05116.83 ▼0.3648.29 ▼1.51
General /wp-admin/admin.php?page=share-options1,1072.0426.4832.83
WP Share /wp-admin/options-general.php?page=wp-share1,0982.1848.1439.70

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/wp-share/admin/views/admin.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: facebook, pinterest, social buttons, sodial sharing buttons, twitter...

wp-share/wp-share.php Passed 13 tests

The entry point to "WP Share" version 1.0.0 is a PHP file that has certain tags in its header comment area
21 characters long description:
Social sharing plugin

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin1,315 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP6204433649
SVG100399
CSS240167
PO File1252571
JavaScript29029

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity8.50
▷ Minimum class complexity1.00
▷ Maximum class complexity30.00
Average method complexity2.05
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes112.50%
▷ Concrete classes787.50%
▷ Final classes00.00%
Methods60
▷ Static methods23.33%
▷ Public methods5490.00%
▷ Protected methods00.00%
▷ Private methods610.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin