83% campuspress-theme-check

Code Review | CampusPress Code Check

WordPress plugin CampusPress Code Check scored83%from 54 tests.

About plugin

  • Plugin page: campuspress-theme...
  • Plugin version: 1.2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.8
  • WordPress version: 6.3.1
  • First release: Feb 20, 2015
  • Latest release: Jul 28, 2017
  • Number of updates: 18
  • Update frequency: every 49.4 days
  • Top authors: igmoweb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,676 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.54ms] Passed 4 tests

Analyzing server-side resources used by CampusPress Code Check
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.77 ▼2.87
Dashboard /wp-admin3.34 ▲0.0351.09 ▲0.50
Posts /wp-admin/edit.php3.39 ▲0.0352.46 ▲1.50
Add New Post /wp-admin/post-new.php5.92 ▲0.0397.84 ▼7.32
Media Library /wp-admin/upload.php3.26 ▲0.0336.86 ▼4.48
Theme Check /wp-admin/themes.php?page=campus-themecheck4.0239.52
Plugin Check /wp-admin/plugins.php?page=campus-plugincheck3.6934.99

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 61 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for CampusPress Code Check
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲6213.28 ▼1.401.88 ▲0.1543.30 ▼1.97
Dashboard /wp-admin2,217 ▲264.81 ▼0.21112.56 ▼2.9042.81 ▲0.36
Posts /wp-admin/edit.php2,097 ▲112.06 ▲0.0141.92 ▲0.6638.17 ▼5.21
Add New Post /wp-admin/post-new.php1,539 ▲1122.79 ▲4.57718.24 ▲47.5356.04 ▲1.72
Media Library /wp-admin/upload.php1,393 ▲24.20 ▲0.10117.44 ▼3.6450.64 ▼2.85
Theme Check /wp-admin/themes.php?page=campus-themecheck8092.0327.5633.97
Plugin Check /wp-admin/plugins.php?page=campus-plugincheck8182.0226.9630.04

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
Almost there! Just fix the following items
  • 51× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'CampusPress_themecheck' not found in wp-content/plugins/campuspress-theme-check/checks/deprecated.php:3
    • > PHP Fatal error
      Uncaught Error: Interface 'CampusPress_themecheck' not found in wp-content/plugins/campuspress-theme-check/checks/postthumb.php:3
    • > PHP Fatal error
      Uncaught Error: Interface 'CampusPress_themecheck' not found in wp-content/plugins/campuspress-theme-check/checks/customs.php:3
    • > PHP Fatal error
      Uncaught Error: Interface 'CampusPress_themecheck' not found in wp-content/plugins/campuspress-theme-check/checks/dep_recommend.php:3
    • > PHP Fatal error
      Uncaught Error: Interface 'CampusPress_themecheck' not found in wp-content/plugins/campuspress-theme-check/checks/cp_users_levels.php:2
    • > PHP Fatal error
      Uncaught Error: Interface 'CampusPress_themecheck' not found in wp-content/plugins/campuspress-theme-check/checks/worms.php:2
    • > PHP Fatal error
      Uncaught Error: Interface 'CampusPress_themecheck' not found in wp-content/plugins/campuspress-theme-check/checks/style_suggested.php:2
    • > PHP Fatal error
      Uncaught Error: Interface 'CampusPress_themecheck' not found in wp-content/plugins/campuspress-theme-check/checks/commpage.php:3
    • > PHP Fatal error
      Uncaught Error: Interface 'CampusPress_themecheck' not found in wp-content/plugins/campuspress-theme-check/checks/searchform.php:3
    • > PHP Fatal error
      Uncaught Error: Interface 'CampusPress_themecheck' not found in wp-content/plugins/campuspress-theme-check/checks/admin_menu.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 90% 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
Attributes that require attention:
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
The official readme.txt might help

campuspress-theme-check/theme-check.php 85% from 13 tests

"CampusPress Code Check" version 1.2.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("campuspress-theme-check.php" instead of "theme-check.php")

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
Everything looks great! No dangerous files found in this plugin2,585 lines of code in 56 files:
LanguageFilesBlank linesComment linesLines of code
PHP524813582,086
PO File2187258414
CSS12077
Markdown1508

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity6.33
▷ Minimum class complexity1.00
▷ Maximum class complexity20.00
Average method complexity3.57
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes50
▷ Abstract classes00.00%
▷ Concrete classes50100.00%
▷ Final classes00.00%
Methods109
▷ Static methods00.00%
▷ Public methods109100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/gray-grad.png0.21KB0.18KB▼ 11.74%