83% spots

Code Review | Spots

WordPress plugin Spots scored 83% from 54 tests.

About plugin

  • Plugin page: spots
  • Plugin version: 1.3.10
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0.2
  • WordPress version: 6.3.1
  • First release: Sep 28, 2011
  • Latest release: Sep 29, 2022
  • Number of updates: 132
  • Update frequency: every 30.7 days
  • Top authors: spectacula (37.88%)sanchothefat (25%)TJNowell (18.18%)evgeniinasyrov (7.58%)AndyWalmsley (6.82%)

Code review

54 tests

User reviews

10 reviews

Install metrics

1,000+ active / 34,401 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.08MB] [CPU: ▼6.41ms] Passed 4 tests

Analyzing server-side resources used by Spots
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0942.22 ▼2.12
Dashboard /wp-admin3.38 ▲0.0757.52 ▼0.91
Posts /wp-admin/edit.php3.49 ▲0.1455.55 ▲1.14
Add New Post /wp-admin/post-new.php5.96 ▲0.07112.41 ▼23.76
Media Library /wp-admin/upload.php3.30 ▲0.0742.89 ▲3.68
Settings /wp-admin/edit.php?post_type=spot&page=spots3.2739.66
Add New /wp-admin/post-new.php?post_type=spot3.4262.30
Spots /wp-admin/edit.php?post_type=spot3.3458.96

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 28 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded
icit_spots_setup
theysaidso_admin_options
widget_theysaidso_widget
widget_spot

Browser metrics Passed 4 tests

Checking browser requirements for Spots
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,862 ▲6213.69 ▼0.832.02 ▲0.1444.37 ▼0.21
Dashboard /wp-admin2,240 ▲344.83 ▼1.03118.87 ▼1.0944.40 ▼0.85
Posts /wp-admin/edit.php2,123 ▲342.00 ▼0.0543.17 ▼2.8934.52 ▲0.55
Add New Post /wp-admin/post-new.php1,568 ▲3423.02 ▼0.10701.88 ▼87.3668.67 ▲16.63
Media Library /wp-admin/upload.php1,416 ▲314.19 ▼0.12105.55 ▼3.8841.90 ▼5.17
Settings /wp-admin/edit.php?post_type=spot&page=spots9181.9936.1030.70
Add New /wp-admin/post-new.php?post_type=spot2,3287.63188.9664.86
Spots /wp-admin/edit.php?post_type=spot1,0892.0038.0631.92

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • icit_spots_setup
    • theysaidso_admin_options
    • widget_spot

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 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/spots/includes/icit-plugin.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Spots widget when you first use it), #2 (The Spots custom post type in action), #3 (Selecting a pre-existing Spot), #4 (The visual editor in Spots), #5 (A Spot output in a sidebar as a widget), #6 (A Template Tag replacement of content in the footer of the 2010 theme.)
  • Plugin Name: You should set the name of your plugin on the first line ( === spots === )
Please take inspiration from this readme.txt

spots/icit-spots.php 85% from 13 tests

The entry point to "Spots" version 1.3.10 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("spots.php" instead of "icit-spots.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 246 characters long)

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
Everything looks great! No dangerous files found in this plugin2,967 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP24233021,396
JavaScript4151122929
PO File3186186482
CSS2311160

PHP code Passed 2 tests

A brief analysis 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.45
Average class complexity35.60
▷ Minimum class complexity13.00
▷ Maximum class complexity64.00
Average method complexity3.62
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods66
▷ Static methods1015.15%
▷ Public methods66100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.00%
Constants8
▷ Global constants8100.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
2 PNG files occupy 0.07MB with 0.05MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon_working.png63.65KB2.48KB▼ 96.10%
assets/icon.png4.99KB2.48KB▼ 50.30%