67% cam-site-builder

Code Review | Cam Site Builder

WordPress plugin Cam Site Builder scored67%from 54 tests.

About plugin

  • Plugin page: cam-site-builder
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.7
  • WordPress version: 6.3.1
  • First release: Sep 13, 2017
  • Latest release: Sep 13, 2017
  • Number of updates: 8
  • Update frequency: every 0.3 days
  • Top authors: modelnet (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /2,362 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▼1.21MB] [CPU: ▼45.51ms] Passed 4 tests

A check of server-side resources used by Cam Site Builder
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.77 ▼0.6913.07 ▼25.98
Dashboard /wp-admin2.81 ▼0.5316.43 ▼44.15
Posts /wp-admin/edit.php2.81 ▼0.5417.07 ▼29.87
Add New Post /wp-admin/post-new.php2.81 ▼3.0715.57 ▼82.03
Media Library /wp-admin/upload.php2.81 ▼0.4214.50 ▼18.26
Cam Site Builder /wp-admin/options-general.php?page=camsitebuilder-control2.8118.75

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
camsitebuilder_settings
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Cam Site Builder
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.14 ▼1.151.78 ▲0.0440.66 ▼1.23
Dashboard /wp-admin2,210 ▲195.89 ▼0.0198.37 ▼9.2337.84 ▼9.32
Posts /wp-admin/edit.php2,093 ▲42.00 ▼0.0036.24 ▲1.4631.24 ▼5.95
Add New Post /wp-admin/post-new.php1,545 ▲718.31 ▼4.85618.61 ▼64.8250.00 ▼7.71
Media Library /wp-admin/upload.php1,395 ▲74.15 ▼0.0298.40 ▼4.6041.33 ▼3.10
Cam Site Builder /wp-admin/options-general.php?page=camsitebuilder-control9332.0323.4425.42

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/cam-site-builder/index.php+252
    Undefined index: activated
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • camsitebuilder_settings
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=camsitebuilder-control
    • > Notice in wp-content/plugins/cam-site-builder/index.php+80
    Undefined index: activated
    • > GET request to /wp-admin/options-general.php?page=camsitebuilder-control
    • > Notice in wp-content/plugins/cam-site-builder/index.php+231
    Undefined index: update_interval

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 fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/cam-site-builder/index.php:16

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 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
Attributes that require attention:
  • Plugin Name: Please specify the plugin name on the first line ( === cam-site-builder === )
  • Screenshots: A description for screenshot #1 is missing in cam-site-builder/assets to your readme.txt
The official readme.txt might help

cam-site-builder/index.php 85% from 13 tests

The entry point to "Cam Site Builder" version 1.0.1 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("cam-site-builder.php" instead of "index.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 161 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
Good job! No executable or dangerous file extensions detected277 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13315277

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity2.30
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods10100.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
There were not PNG files found in your plugin