83% smwpp-cta

Code Review | SMWPP-CTA

WordPress plugin SMWPP-CTA scored83%from 54 tests.

About plugin

  • Plugin page: smwpp-cta
  • Plugin version: 1.3.3
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.1
  • WordPress version: 6.3.1
  • First release: Jan 30, 2023
  • Latest release: Jan 30, 2023
  • Number of updates: 7
  • Update frequency: every 1.4 days
  • Top authors: anupamwp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,429 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼13.87ms] Passed 4 tests

Analyzing server-side resources used by SMWPP-CTA
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0537.49 ▼4.90
Dashboard /wp-admin3.39 ▲0.0550.40 ▼21.63
Posts /wp-admin/edit.php3.44 ▲0.0950.12 ▼0.43
Add New Post /wp-admin/post-new.php5.97 ▲0.0985.60 ▼28.50
Media Library /wp-admin/upload.php3.32 ▲0.0941.26 ▲3.75
Social Media CTA /wp-admin/options-general.php?page=smwpp-cta-settings-page3.2936.67

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for SMWPP-CTA
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲6014.48 ▲0.121.55 ▼0.2047.01 ▲4.76
Dashboard /wp-admin2,228 ▲284.87 ▼1.0299.70 ▼1.9737.59 ▼2.31
Posts /wp-admin/edit.php2,107 ▲72.05 ▲0.0837.25 ▲0.8132.88 ▼7.16
Add New Post /wp-admin/post-new.php1,555 ▲2122.94 ▼0.16641.76 ▼18.8462.29 ▼11.91
Media Library /wp-admin/upload.php1,401 ▲44.14 ▼0.14112.85 ▼2.8346.14 ▼5.73
Social Media CTA /wp-admin/options-general.php?page=smwpp-cta-settings-page9752.0624.3634.79

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

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)
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 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 add_action() in wp-content/plugins/smwpp-cta/smwpp-cta.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Please add descriptions for these screenshots #2, #3 in smwpp-cta/assets to your readme.txt
You can take inspiration from this readme.txt

smwpp-cta/smwpp-cta.php 85% from 13 tests

The main file in "SMWPP-CTA" v. 1.3.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Requires PHP: The required version number must match the one declared in readme.txt ("5.4" instead of "7.2")
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

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
Everything looks great! No dangerous files found in this plugin393 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP23420199
JavaScript2918130
CSS214252
SVG1009
Markdown1003

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity1.88
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
1 PNG file occupies 0.09MB with 0.06MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
social_media_wordpress_plugin_setting_Screenshot.png96.34KB33.88KB▼ 64.84%