72% spacento

Code Review | Spacento

WordPress plugin Spacento scored72%from 54 tests.

About plugin

  • Plugin page: spacento
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.1-5.9.1
  • WordPress version: 6.3.1
  • First release: Sep 19, 2020
  • Latest release: Sep 9, 2022
  • Number of updates: 31
  • Update frequency: every 23.3 days
  • Top authors: sproutient (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /747 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
Install script ran successfully

Server metrics [RAM: ▲0.23MB] [CPU: ▼7.23ms] Passed 4 tests

A check of server-side resources used by Spacento
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.98 ▲0.5243.40 ▼2.41
Dashboard /wp-admin3.79 ▲0.4954.62 ▲2.66
Posts /wp-admin/edit.php3.84 ▲0.4950.28 ▲2.81
Add New Post /wp-admin/post-new.php5.42 ▼0.4761.13 ▼31.36
Media Library /wp-admin/upload.php3.65 ▲0.4244.87 ▲2.21
All Properties /wp-admin/edit.php?post_type=spacento_property3.7642.77
Property Type /wp-admin/edit-tags.php?taxonomy=spacento-property-type&post_type=spacento_property3.6539.84
Add New Property /wp-admin/post-new.php?post_type=spacento_property3.8862.41
Property Location /wp-admin/edit-tags.php?taxonomy=spacento-property-location&post_type=spacento_property3.6535.93

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 76 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_spacento-properties-widget
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Spacento: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,004 ▲24314.87 ▲0.5232.09 ▲30.1736.93 ▼8.31
Dashboard /wp-admin2,240 ▲605.67 ▲0.0294.10 ▼5.6141.82 ▼0.25
Posts /wp-admin/edit.php2,142 ▲392.01 ▲0.0137.40 ▼1.2035.44 ▲0.38
Add New Post /wp-admin/post-new.php6,235 ▲4,70719.05 ▼4.12926.74 ▲236.1266.37 ▲5.53
Media Library /wp-admin/upload.php1,439 ▲394.25 ▲0.05104.16 ▼15.1646.41 ▼1.66
All Properties /wp-admin/edit.php?post_type=spacento_property1,1701.9734.8631.13
Property Type /wp-admin/edit-tags.php?taxonomy=spacento-property-type&post_type=spacento_property1,3132.1727.7830.24
Add New Property /wp-admin/post-new.php?post_type=spacento_property3,0698.03187.33123.92
Property Location /wp-admin/edit-tags.php?taxonomy=spacento-property-location&post_type=spacento_property1,3132.2926.7329.24

Uninstaller [IO: ▲0.00MB] [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
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_spacento-properties-widget
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/spacento/admin/partials/spacento-admin-display.php
    • > /wp-content/plugins/spacento/public/partials/spacento-public-display.php
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Trait 'Spacento_Property_Renderer' not found in wp-content/plugins/spacento/admin/class-shortcode.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/spacento/admin/class-widget.php:6
    • > PHP Fatal error
      Trait 'Spacento_Property_Renderer' not found in wp-content/plugins/spacento/admin/class-spacento-shortcodes.php on line 15
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/spacento/admin/class-spacento-properties-widget.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/spacento/public/templates/property.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/spacento/admin/partials/meta-box.php:18

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
    • > GET request to /wp-admin/post-new.php?post_type=spacento_property
    • > Network (severe)
    wp-admin/REPLACEWITHURL - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === spacento === )
  • Donate link: Please fix this invalid url: "sproutient.com"
The official readme.txt is a good inspiration

spacento/spacento.php Passed 13 tests

The principal PHP file in "Spacento" v. 1.0.4 is loaded by WordPress automatically on each request
96 characters long description:
This is a short description of what the plugin does. It's displayed in the WordPress admin area.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected5,445 lines of code in 64 files:
LanguageFilesBlank linesComment linesLines of code
PHP441,3321,8923,707
Sass42000876
JavaScript1134032853
JSON1005
CSS4004

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity15.06
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity3.91
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces2
Interfaces0
Traits1
Classes31
▷ Abstract classes00.00%
▷ Concrete classes31100.00%
▷ Final classes00.00%
Methods146
▷ Static methods2013.70%
▷ Public methods13995.21%
▷ Protected methods00.00%
▷ Private methods74.79%
Functions17
▷ Named functions423.53%
▷ Anonymous functions1376.47%
Constants3
▷ Global constants3100.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
There are no PNG files in this plugin