84% wp-smart-content

Code Review | WP Smart Content

WordPress plugin WP Smart Content scored 84% from 54 tests.

About plugin

  • Plugin page: wp-smart-content
  • Plugin version: 1.1.4
  • PHP compatiblity: 5.3.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.0-5.7.2
  • WordPress version: 5.8.1
  • First release: Jul 18, 2018
  • Latest release: Jul 4, 2021
  • Number of updates: 54
  • Update frequency: every 20.0 days
  • Top authors: vinodsebastian (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 507 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼144.67ms] Passed 4 tests

Analyzing server-side resources used by WP Smart Content
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1343.63 ▲19.50
Dashboard /wp-admin3.08 ▲0.0337.78 ▼6.04
Posts /wp-admin/edit.php3.13 ▲0.0239.51 ▼7.26
Add New Post /wp-admin/post-new.php5.44 ▲0.0085.62 ▼563.83
Media Library /wp-admin/upload.php3.02 ▲0.0232.89 ▼1.53
WP Smart Content /wp-admin/options-general.php?page=wpsc_settings3.0334.08

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 1 new option
New WordPress options
category_children

Browser metrics Passed 4 tests

WP Smart Content: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,684 ▲8816.13 ▲0.447.61 ▼0.5346.91 ▲0.37
Dashboard /wp-admin2,978 ▲475.93 ▼0.04131.54 ▼9.24112.86 ▼1.88
Posts /wp-admin/edit.php2,744 ▲52.69 ▲0.0161.55 ▼3.4588.34 ▲1.23
Add New Post /wp-admin/post-new.php1,679 ▲918.96 ▼0.24370.14 ▼10.96108.78 ▲4.35
Media Library /wp-admin/upload.php1,812 ▲25.03 ▲0.01142.47 ▼12.30117.51 ▼0.21
WP Smart Content /wp-admin/options-general.php?page=wpsc_settings1,1522.86108.11133.66

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 1 option
    • category_children

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/wp-smart-content/uninstall.php:12

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
8 plugin tags: styles, scripts, wp smart content, add to footer, tracking code...

wp-smart-content/class-wpsc.php 85% from 13 tests

The main file in "WP Smart Content" v. 1.1.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-smart-content.php" instead of "class-wpsc.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 612 characters long)

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
Success! There were no dangerous files found in this plugin699 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP274123389
CSS1264173
JavaScript195137

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity64.00
▷ Minimum class complexity64.00
▷ Maximum class complexity64.00
Average method complexity5.27
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods17.69%
▷ Public methods1292.31%
▷ Protected methods00.00%
▷ Private methods17.69%
Functions6
▷ Named functions00.00%
▷ Anonymous functions6100.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon.png4.26KB1.83KB▼ 56.99%