83% sharewhere

Code Review | ShareWhere

WordPress plugin ShareWhere scored83%from 54 tests.

About plugin

  • Plugin page: sharewhere
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Aug 19, 2015
  • Latest release: Oct 29, 2015
  • Number of updates: 8
  • Update frequency: every 9.0 days
  • Top authors: sanket.parmar (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /1,580 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.07MB] [CPU: ▼7.78ms] Passed 4 tests

This is a short check of server-side resources used by ShareWhere
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0844.20 ▲1.76
Dashboard /wp-admin3.37 ▲0.0751.53 ▼0.11
Posts /wp-admin/edit.php3.48 ▲0.1349.13 ▼5.39
Add New Post /wp-admin/post-new.php5.97 ▲0.0887.26 ▼26.02
Media Library /wp-admin/upload.php3.29 ▲0.0738.86 ▲0.42

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 27 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for ShareWhere
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,009 ▲24815.03 ▲0.8613.17 ▲11.0242.95 ▼1.51
Dashboard /wp-admin2,287 ▲1165.88 ▲0.2493.19 ▲5.9442.27 ▼0.14
Posts /wp-admin/edit.php2,198 ▲953.03 ▲0.9943.32 ▲1.9635.57 ▲0.96
Add New Post /wp-admin/post-new.php1,776 ▲25023.57 ▲0.07695.71 ▲12.6137.09 ▼15.99
Media Library /wp-admin/upload.php1,495 ▲985.33 ▲1.15108.28 ▼7.4240.89 ▼6.92

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/sharewhere/index.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Tested up to: Version not formatted correctly
  • Requires at least: Version not formatted correctly
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
The official readme.txt is a good inspiration

sharewhere/index.php 85% from 13 tests

"ShareWhere" version 1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("sharewhere.php" instead of "index.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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
Good job! No executable or dangerous file extensions detected2,787 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript75163121,853
CSS58311540
PHP663109233
Sass513085
Markdown141060
JSON10016

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity3.75
▷ Minimum class complexity1.00
▷ Maximum class complexity9.00
Average method complexity1.65
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin