10% web-smarter

Code Review | Web Smarter

WordPress plugin Web Smarter scored 10% from 54 tests.

About plugin

  • Plugin page: web-smarter
  • Plugin version: 1.2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-5.0.2
  • WordPress version: 5.9.2
  • First release: Apr 9, 2018
  • Latest release: Mar 19, 2019
  • Number of updates: 52
  • Update frequency: every 6.7 days
  • Top authors: websmarter (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 1,047 total downloads

Benchmarks

Plugin footprint 75% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/web-smarter/index.php+459
    Trying to access array offset on value of type null

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

Server-side resources used by Web Smarter
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0156.92 ▲3.70
Dashboard /wp-admin3.41 ▲0.0032.46 ▲0.16
Posts /wp-admin/edit.php3.64 ▲0.0041.87 ▲5.23
Add New Post /wp-admin/post-new.php6.88 ▼0.0992.08 ▼1,156.78
Media Library /wp-admin/upload.php3.29 ▲0.0024.79 ▲0.76

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 89 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Web Smarter
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,763 ▲2115.86 ▲0.215.71 ▼2.011.90 ▼0.27
Dashboard /wp-admin2,888 ▲306.16 ▼0.07116.72 ▼20.52154.81 ▼5.97
Posts /wp-admin/edit.php2,691 ▼03.24 ▼0.0062.98 ▲0.40138.62 ▼5.65
Add New Post /wp-admin/post-new.php1,661 ▼9116.23 ▼4.83411.13 ▼51.59158.98 ▲10.40
Media Library /wp-admin/upload.php1,698 ▲35.51 ▲0.01139.93 ▲0.36188.05 ▲1.08

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstall script ran successfully

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/web-smarter/vue/components/common/select2.php
    • > /wp-content/plugins/web-smarter/index.php
    • > /wp-content/plugins/web-smarter/vue/index.php
  • 14× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to a member function postUrlUsingCurl() on null in wp-content/plugins/web-smarter/vue/components/taskDetails.php:5
    • > PHP Notice
      Undefined variable: wpsTaskFunObj in wp-content/plugins/web-smarter/vue/components/common/kanban.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/web-smarter/vue/components/common/modelPopup.php:14
    • > PHP Notice
      Undefined variable: wpsTaskFunObj in wp-content/plugins/web-smarter/vue/components/taskListing.php on line 5
    • > PHP Warning
      Use of undefined constant WSP_ASSETS - assumed 'WSP_ASSETS' (this will throw an Error in a future version of PHP) in wp-content/plugins/web-smarter/vue/components/common/modelPopup.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to a member function postUrlUsingCurl() on null in wp-content/plugins/web-smarter/vue/components/common/kanban.php:5
    • > PHP Notice
      Undefined variable: wpsTaskFunObj in wp-content/plugins/web-smarter/vue/components/taskListingBoard.php on line 5
    • > PHP Warning
      Use of undefined constant WSP_VUE - assumed 'WSP_VUE' (this will throw an Error in a future version of PHP) in wp-content/plugins/web-smarter/vue/index.php on line 8
    • > PHP Fatal error
      Uncaught Error: Class 'WebSmarter\\Includes\\Gatway\\Paypal\\Base_Paypal_Adapter' not found in wp-content/plugins/web-smarter/includes/gatway/paypal/class-paypal-ipn.php:13
    • > PHP Notice
      Undefined variable: wpsTaskFunObj in wp-content/plugins/web-smarter/vue/components/taskDetails.php on line 5

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 79% from 29 tests

readme.txt 81% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots lack descriptions #3, #4, #5, #6 in web-smarter/assets to your readme.txt
  • Donate link: Invalid url: ""
  • Stable tag: No value
You can look at the official readme.txt

web-smarter/index.php 77% from 13 tests

The main file in "Web Smarter" v. 1.2.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:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("web-smarter.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
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 202 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected10,746 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript101,3206087,526
PHP252727352,187
CSS590231,033

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity17.00
▷ Minimum class complexity2.00
▷ Maximum class complexity35.00
Average method complexity2.96
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes7
▷ Abstract classes114.29%
▷ Concrete classes685.71%
▷ Final classes233.33%
Methods57
▷ Static methods712.28%
▷ Public methods5494.74%
▷ Protected methods23.51%
▷ Private methods11.75%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants777.78%
▷ Class constants222.22%
▷ Public constants2100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
42 PNG files occupy 0.67MB with 0.50MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon-4.png2.43KB0.45KB▼ 81.45%
assets/images/blank-person__.png7.39KB2.00KB▼ 72.86%
assets/images/side_plus.png1.94KB0.32KB▼ 83.55%
assets/images/back_icon.png2.58KB0.74KB▼ 71.27%
assets/images/icon-1.png3.06KB1.02KB▼ 66.69%