84% service-provider-profile-cpt

Code Review | SetMore Theme - Custom Post Types

WordPress plugin SetMore Theme - Custom Post Types scored84%from 54 tests.

About plugin

  • Plugin page: service-provider-...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.8
  • WordPress version: 6.3.1
  • First release: Dec 15, 2015
  • Latest release: Apr 14, 2016
  • Number of updates: 24
  • Update frequency: every 22.3 days
  • Top authors: setmore (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /3,506 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
Installer ran successfully

Server metrics [RAM: ▲0.15MB] [CPU: ▼0.81ms] Passed 4 tests

Analyzing server-side resources used by SetMore Theme - Custom Post Types
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1638.41 ▼6.00
Dashboard /wp-admin3.44 ▲0.1451.97 ▼0.93
Posts /wp-admin/edit.php3.56 ▲0.2050.86 ▲2.81
Add New Post /wp-admin/post-new.php6.03 ▲0.1591.18 ▲0.88
Media Library /wp-admin/upload.php3.37 ▲0.1439.51 ▲8.29
All People /wp-admin/edit.php?post_type=people3.4138.51
All Service /wp-admin/edit.php?post_type=service3.4137.31
Add New /wp-admin/post-new.php?post_type=service3.5251.53
Service Categories /wp-admin/edit-tags.php?taxonomy=service_category&post_type=service3.3635.76
People Categories /wp-admin/edit-tags.php?taxonomy=people_category&post_type=people3.3631.83
Add New /wp-admin/post-new.php?post_type=people3.5253.65

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for SetMore Theme - Custom Post Types
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,866 ▲10514.35 ▲0.012.48 ▲0.7040.33 ▼3.93
Dashboard /wp-admin2,260 ▲835.60 ▼0.0384.12 ▼17.9439.37 ▼3.65
Posts /wp-admin/edit.php2,165 ▲682.04 ▲0.0254.54 ▲17.8045.19 ▲10.06
Add New Post /wp-admin/post-new.php1,578 ▲5223.47 ▲0.45680.27 ▲56.8266.71 ▲20.25
Media Library /wp-admin/upload.php1,453 ▲534.24 ▲0.10102.73 ▲2.5546.33 ▲2.43
All People /wp-admin/edit.php?post_type=people1,1602.0031.2733.86
All Service /wp-admin/edit.php?post_type=service1,1601.9333.1230.79
Add New /wp-admin/post-new.php?post_type=service2,6607.70175.9368.86
Service Categories /wp-admin/edit-tags.php?taxonomy=service_category&post_type=service1,3392.1227.1529.89
People Categories /wp-admin/edit-tags.php?taxonomy=people_category&post_type=people1,3392.1326.2526.94
Add New /wp-admin/post-new.php?post_type=people2,9357.77170.7966.02

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
Almost there! Just fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/service-provider-profile-cpt/trunk/service-provider-profile-cpt.php:46
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/service-provider-profile-cpt/service-provider-profile-cpt.php:46

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 ("Add New Staff” section and displays all the entries for “Staff” post type), #2 ("Add New Services” section and displays all the entries for “Services” post type), #3 (Displays the “Staff Category" section), #4 (Displays the “Services Category" section)
You can look at the official readme.txt

service-provider-profile-cpt/service-provider-profile-cpt.php Passed 13 tests

The principal PHP file in "SetMore Theme - Custom Post Types" v. 1.1 is loaded by WordPress automatically on each request
69 characters long description:
Creates "Staff", "Services" custom post type for FREE SetMore Themes.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin502 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP111846502

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions78
▷ Named functions78100.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

All PNG images should be compressed to minimize bandwidth usage for end users
8 PNG files occupy 1.77MB with 1.27MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
trunk/screenshot-1.png198.04KB55.99KB▼ 71.73%
trunk/screenshot-2.png216.41KB61.28KB▼ 71.68%
screenshot-1.png198.04KB55.99KB▼ 71.73%
screenshot-4.png241.30KB70.44KB▼ 70.81%
screenshot-3.png252.27KB73.72KB▼ 70.78%