84% basic-sharer

Code Review | Basic Sharer

WordPress plugin Basic Sharer scored84%from 54 tests.

About plugin

  • Plugin page: basic-sharer
  • Plugin version: 0.5
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Aug 19, 2019
  • Latest release: May 27, 2023
  • Number of updates: 8
  • Update frequency: every 172.3 days
  • Top authors: angel_aparicio_gomez (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /645 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.02MB] [CPU: ▼5.46ms] Passed 4 tests

Analyzing server-side resources used by Basic Sharer
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0239.93 ▼0.90
Dashboard /wp-admin3.32 ▲0.0247.68 ▼3.74
Posts /wp-admin/edit.php3.38 ▲0.0249.70 ▼1.36
Add New Post /wp-admin/post-new.php5.91 ▲0.0294.41 ▼15.82
Media Library /wp-admin/upload.php3.25 ▲0.0139.67 ▲4.33
Basic Sharer /wp-admin/options-general.php?page=basic_sharer_options3.2235.11

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Basic Sharer
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.35 ▼0.001.97 ▲0.1844.55 ▼7.12
Dashboard /wp-admin2,202 ▲255.62 ▼0.0492.37 ▼10.1941.86 ▼4.31
Posts /wp-admin/edit.php2,104 ▲71.96 ▼0.0639.45 ▲2.7836.87 ▲1.87
Add New Post /wp-admin/post-new.php1,531 ▲523.22 ▲0.01586.00 ▼118.6052.47 ▼4.89
Media Library /wp-admin/upload.php1,407 ▲74.18 ▼0.0898.17 ▼18.1942.98 ▼5.07
Basic Sharer /wp-admin/options-general.php?page=basic_sharer_options8212.0226.0028.12

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/basic-sharer/basic-sharer.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/basic-sharer/options_page.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
2 plugin tags: social, share

basic-sharer/basic-sharer.php 92% from 13 tests

This is the main PHP file of "Basic Sharer" version 0.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Text Domain: The text domain should only use lowercase characters and dashes

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
Good job! No executable or dangerous file extensions detected115 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2271183
PO File18832

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions250.00%
▷ Anonymous functions250.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
3 compressed PNG files occupy 0.00MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/tw-24.png0.37KB0.38KB0.00%
images/ln-24.png1.33KB0.90KB▼ 32.33%
images/fb-24.png0.23KB0.24KB0.00%