89% campus-explorer-widget

Code Review | Campus Explorer Widget

WordPress plugin Campus Explorer Widget scored89%from 54 tests.

About plugin

  • Plugin page: campus-explorer-w...
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-5.3
  • WordPress version: 6.3.1
  • First release: Sep 28, 2015
  • Latest release: Mar 6, 2020
  • Number of updates: 21
  • Update frequency: every 77.2 days
  • Top authors: CampusExplorer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /2,346 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.20MB] [CPU: ▼1.70ms] Passed 4 tests

Analyzing server-side resources used by Campus Explorer Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.1941.65 ▼3.04
Dashboard /wp-admin3.50 ▲0.2047.61 ▼4.06
Posts /wp-admin/edit.php3.61 ▲0.2652.65 ▲0.17
Add New Post /wp-admin/post-new.php6.10 ▲0.21100.74 ▲0.12
Media Library /wp-admin/upload.php3.42 ▲0.1938.58 ▲1.74
Campus Explorer /wp-admin/options-general.php?page=campusexplorer_settings3.3931.08

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 28 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts
campusexplorer_version
widget_campusexplorer
theysaidso_admin_options

Browser metrics Passed 4 tests

Campus Explorer Widget: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲3914.35 ▼0.361.86 ▼0.1644.17 ▼1.34
Dashboard /wp-admin2,203 ▲355.67 ▼0.0992.05 ▼5.8638.91 ▼2.54
Posts /wp-admin/edit.php2,108 ▲82.00 ▲0.0539.66 ▼1.1735.84 ▼6.55
Add New Post /wp-admin/post-new.php1,533 ▼223.05 ▲4.81672.37 ▲8.3056.84 ▼7.79
Media Library /wp-admin/upload.php1,411 ▲84.29 ▲0.1097.18 ▼6.1540.58 ▼6.98
Campus Explorer /wp-admin/options-general.php?page=campusexplorer_settings8232.0426.0629.28

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_campusexplorer
    • widget_theysaidso_widget
    • campusexplorer_version
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: campusexplorer, ce, college

campus-explorer-widget/campusexplorer.php 69% from 13 tests

The main PHP script in "Campus Explorer Widget" version 1.4 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Domain Path: Please prefix the domain path with a forward slash character ("/")
  • Main file name: The principal plugin file should be the same as the plugin slug ("campus-explorer-widget.php" instead of "campusexplorer.php")
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("")

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
Success! There were no dangerous files found in this plugin880 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP8230354678
JavaScript73316170
JSON10014
LESS10010
CSS1008

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity28.20
▷ Minimum class complexity5.00
▷ Maximum class complexity61.00
Average method complexity4.49
▷ Minimum method complexity1.00
▷ Maximum method complexity43.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods39
▷ Static methods37.69%
▷ Public methods3794.87%
▷ Protected methods00.00%
▷ Private methods25.13%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
5 PNG files occupy 1.05MB with 0.70MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png224.93KB59.59KB▼ 73.51%
assets/screenshot-2.png416.92KB124.25KB▼ 70.20%
assets/screenshot-4.png235.83KB83.61KB▼ 64.55%
assets/screenshot-3.png193.33KB55.67KB▼ 71.20%
assets/img/campus-explorer-logo_small.png8.75KB4.34KB▼ 50.41%