84% search-star-wars-stuff

Code Review | Search Star Wars Stuff

WordPress plugin Search Star Wars Stuff scored84%from 54 tests.

About plugin

  • Plugin page: search-star-wars-...
  • Plugin version: 1.2.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5.3-5.6.0
  • WordPress version: 6.3.1
  • First release: Dec 29, 2020
  • Latest release: Jan 13, 2021
  • Number of updates: 7
  • Update frequency: every 2.3 days
  • Top authors: patrickpelayo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /491 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼2.55ms] Passed 4 tests

Server-side resources used by Search Star Wars Stuff
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0744.51 ▼2.30
Dashboard /wp-admin3.36 ▲0.0550.11 ▼4.96
Posts /wp-admin/edit.php3.41 ▲0.0549.13 ▼0.62
Add New Post /wp-admin/post-new.php5.94 ▲0.0593.21 ▲1.00
Media Library /wp-admin/upload.php3.28 ▲0.0535.98 ▼2.31

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 23 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_star_wars_widget
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Search Star Wars Stuff
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,963 ▲17713.81 ▼0.7311.71 ▲9.6440.34 ▼6.71
Dashboard /wp-admin2,206 ▲295.68 ▲0.1094.42 ▼6.6743.51 ▼2.37
Posts /wp-admin/edit.php2,111 ▲112.02 ▲0.0135.61 ▼1.0332.18 ▼5.11
Add New Post /wp-admin/post-new.php6,208 ▲4,68219.52 ▼3.54856.40 ▲180.1458.65 ▼2.03
Media Library /wp-admin/upload.php1,412 ▲124.31 ▲0.11101.71 ▼19.6444.48 ▼2.43

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: 7 options
    • widget_star_wars_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/search-star-wars-stuff/src/assets/php/widget.php:2

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
5 plugin tags: search star, darth vader, star wars, wars, star

search-star-wars-stuff/plugin.php 92% from 13 tests

"Search Star Wars Stuff" version 1.2.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("search-star-wars-stuff.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected811 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript58293325
PHP545115179
Sass41910167
CSS4156126
JSON20014

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.60
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods480.00%
▷ Protected methods120.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin