84% wpstores-theme-enhancer

Code Review | WPStores Theme Enhancer

WordPress plugin WPStores Theme Enhancer scored84%from 54 tests.

About plugin

  • Plugin page: wpstores-theme-en...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.6
  • WordPress version: 6.3.1
  • First release: Jun 25, 2013
  • Latest release: Jun 25, 2013
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: itsabhik (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /798 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼2.30ms] Passed 4 tests

Analyzing server-side resources used by WPStores Theme Enhancer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1035.65 ▼3.55
Dashboard /wp-admin3.40 ▲0.1050.63 ▲1.84
Posts /wp-admin/edit.php3.45 ▲0.1045.31 ▼2.68
Add New Post /wp-admin/post-new.php5.98 ▲0.1084.70 ▼4.82
Media Library /wp-admin/upload.php3.33 ▲0.1034.96 ▲1.97

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for WPStores Theme Enhancer
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,838 ▲10313.58 ▼0.803.06 ▲1.2194.60 ▲48.41
Dashboard /wp-admin2,206 ▲154.86 ▼0.17101.42 ▲4.2842.25 ▼3.00
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0335.07 ▼4.7634.19 ▼1.24
Add New Post /wp-admin/post-new.php1,528 ▼923.08 ▼0.08643.33 ▲0.8553.86 ▲2.09
Media Library /wp-admin/upload.php1,388 ▲34.19 ▼0.2197.00 ▼3.5548.06 ▲6.39

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wpstores-theme-enhancer/lib/author.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wpstores-theme-enhancer/lib/seo.php:89
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wpstores-theme-enhancer/lib/sidebar.php:185
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wpstores-theme-enhancer/lib/opengraph.php:116
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wpstores-theme-enhancer/lib/social.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wpstores-theme-enhancer/wpstores.php:18

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: theme enhancer, wpstores

wpstores-theme-enhancer/wpstores.php 92% from 13 tests

"WPStores Theme Enhancer" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("wpstores-theme-enhancer.php" instead of "wpstores.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin982 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP67580521
JavaScript2133181249
CSS11730212

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.37
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%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
21 PNG files occupy 0.13MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/linkedin.png2.06KB1.39KB▼ 32.37%
images/sbmail.png1.25KB0.48KB▼ 61.61%
images/yahoo.png2.05KB1.35KB▼ 34.03%
images/googleplus.png2.44KB1.42KB▼ 42.01%
images/default.png1.55KB1.06KB▼ 32.04%