84% spider-invasion

Code Review | Spider Invasion!

WordPress plugin Spider Invasion! scored84%from 54 tests.

About plugin

  • Plugin page: spider-invasion
  • Plugin version: 0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5.1
  • WordPress version: 6.3.1
  • First release: May 13, 2013
  • Latest release: May 31, 2013
  • Number of updates: 16
  • Update frequency: every 1.1 days
  • Top authors: matthewbe (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /861 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.96ms] Passed 4 tests

Server-side resources used by Spider Invasion!
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0135.63 ▼13.99
Dashboard /wp-admin3.32 ▲0.0146.11 ▼4.26
Posts /wp-admin/edit.php3.37 ▲0.0146.38 ▼1.19
Add New Post /wp-admin/post-new.php5.90 ▲0.0184.72 ▼8.40
Media Library /wp-admin/upload.php3.24 ▲0.0136.23 ▲0.37

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Spider Invasion!: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.25 ▼1.041.67 ▼0.2640.20 ▼1.80
Dashboard /wp-admin2,203 ▲155.76 ▼0.0994.48 ▼22.4838.27 ▼4.91
Posts /wp-admin/edit.php2,089 ▼32.02 ▲0.0136.88 ▼1.1235.12 ▲0.06
Add New Post /wp-admin/post-new.php1,542 ▲918.37 ▼4.71591.74 ▼83.3262.73 ▲8.16
Media Library /wp-admin/upload.php1,382 ▼64.20 ▲0.0495.37 ▼15.5341.41 ▼5.73

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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 items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/spider-invasion/spider-invasion.php:40

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Contributors: The plugin contributors field is missing
The official readme.txt is a good inspiration

spider-invasion/spider-invasion.php Passed 13 tests

The primary PHP file in "Spider Invasion!" version 0.7 is used by WordPress to initiate all plugin functionality
79 characters long description:
Spiders invade your oldest posts. The older the post, the more spiders you get.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin211 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript205156
PHP1143155

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods120.00%
▷ Public methods360.00%
▷ Protected methods00.00%
▷ Private methods240.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
6 PNG files occupy 0.26MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/cute-spider-3.png3.86KB1.70KB▼ 56.06%
images/originals/cute-spider-3.png88.59KB53.11KB▼ 40.05%
images/cute-spider-2.png3.78KB1.63KB▼ 56.93%
images/originals/cute-spider-1.png86.00KB51.52KB▼ 40.09%
images/originals/cute-spider-2.png82.98KB49.56KB▼ 40.28%