83% share-theme

Code Review | Share Theme Plugin

WordPress plugin Share Theme Plugin scored83%from 54 tests.

About plugin

  • Plugin page: share-theme
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Dec 28, 2018
  • Latest release: Dec 30, 2018
  • Number of updates: 5
  • Update frequency: every 0.4 days
  • Top authors: mhtheme (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /473 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.26MB] [CPU: ▼4.37ms] Passed 4 tests

Server-side resources used by Share Theme Plugin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.73 ▲0.2737.66 ▼4.33
Dashboard /wp-admin3.56 ▲0.2647.51 ▼1.33
Posts /wp-admin/edit.php3.67 ▲0.3254.02 ▼3.27
Add New Post /wp-admin/post-new.php6.16 ▲0.2795.08 ▼8.56
Media Library /wp-admin/upload.php3.48 ▲0.2541.62 ▲10.90

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Share Theme Plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,889 ▲15413.54 ▼0.829.11 ▲7.4544.27 ▲0.97
Dashboard /wp-admin2,215 ▲305.07 ▼0.82108.77 ▲6.5441.33 ▼2.22
Posts /wp-admin/edit.php2,096 ▲72.04 ▼0.0240.68 ▼2.5135.34 ▲0.15
Add New Post /wp-admin/post-new.php1,522 ▼823.39 ▲5.23657.09 ▲23.1461.82 ▲6.52
Media Library /wp-admin/upload.php1,395 ▲44.13 ▼0.11111.60 ▲13.9648.04 ▲5.55

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_share_theme_plugin_about_me_widget
    • widget_theysaidso_widget
    • widget_share_theme_plugin_recent_post_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/share-theme/widgets/share-theme-plugin-about-me-widget.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/share-theme/widgets/share-theme-plugin-recent-post-widget.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Tags: Too many tags (27 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

share-theme/share-theme-plugin.php 85% from 13 tests

The main PHP file in "Share Theme Plugin" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("share-theme.php" instead of "share-theme-plugin.php")

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
There were no executable files found in this plugin1,856 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP151745571,333
JavaScript3934284
CSS34011239

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity5.10
▷ Minimum class complexity1.00
▷ Maximum class complexity19.00
Average method complexity1.80
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods51
▷ Static methods35.88%
▷ Public methods4486.27%
▷ Protected methods23.92%
▷ Private methods59.80%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected