84% socius-marketing-page-taxonomy

Code Review | Socius Marketing Page Taxonomy

WordPress plugin Socius Marketing Page Taxonomy scored84%from 54 tests.

About plugin

  • Plugin page: socius-marketing-...
  • Plugin version: 1.1.14
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9
  • WordPress version: 6.3.1
  • First release: Nov 14, 2016
  • Latest release: Jan 13, 2022
  • Number of updates: 41
  • Update frequency: every 46.1 days
  • Top authors: sociusmarketing (100%)

Code review

54 tests

User reviews

1 review

Install metrics

600+ active /4,488 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.18MB] [CPU: ▼1.35ms] Passed 4 tests

An overview of server-side resources used by Socius Marketing Page Taxonomy
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1946.70 ▲8.72
Dashboard /wp-admin3.49 ▲0.1559.73 ▼0.16
Posts /wp-admin/edit.php3.60 ▲0.2547.53 ▲2.96
Add New Post /wp-admin/post-new.php6.07 ▲0.1885.42 ▼11.38
Media Library /wp-admin/upload.php3.41 ▲0.1838.36 ▲3.17
Custom Taxonomy /wp-admin/options-general.php?page=smct-options3.3835.26
Custom Categories /wp-admin/edit-tags.php?taxonomy=smct_cats&post_type=page3.4037.53
Areas Served /wp-admin/edit-tags.php?taxonomy=smct_areas&post_type=page3.4033.80

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 12 new options
New WordPress options
smct_area_page_id
widget_theysaidso_widget
widget_recent-posts
smct_category_page_id
widget_recent-comments
smct_category_page_title
smct_category_page_name
db_upgraded
smct_area_page_name
theysaidso_admin_options
...

Browser metrics Passed 4 tests

An overview of browser requirements for Socius Marketing Page Taxonomy
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,857 ▲11114.14 ▼0.211.72 ▲0.1648.13 ▲11.82
Dashboard /wp-admin2,260 ▲795.68 ▲0.0095.22 ▼1.6744.43 ▲0.94
Posts /wp-admin/edit.php2,116 ▲342.01 ▼0.0132.95 ▼2.3534.57 ▲0.75
Add New Post /wp-admin/post-new.php1,542 ▲623.11 ▼0.16664.35 ▲33.8755.99 ▲3.62
Media Library /wp-admin/upload.php1,416 ▲164.18 ▼0.0394.89 ▼13.3543.31 ▼3.83
Custom Taxonomy /wp-admin/options-general.php?page=smct-options9582.0522.7330.29
Custom Categories /wp-admin/edit-tags.php?taxonomy=smct_cats&post_type=page1,2932.1227.6329.29
Areas Served /wp-admin/edit-tags.php?taxonomy=smct_areas&post_type=page1,2932.1226.7127.83

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • 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 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/socius-marketing-page-taxonomy/inc/template-archive.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/socius-marketing-page-taxonomy/inc/options-page.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/socius-marketing-page-taxonomy/socius-marketing-page-taxonomy.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/socius-marketing-page-taxonomy/inc/taxonomies.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/socius-marketing-page-taxonomy/inc/archive-pages.php:144

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 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
6 plugin tags: taxonomies, categories, locations, pages, taxonomy...

socius-marketing-page-taxonomy/socius-marketing-page-taxonomy.php Passed 13 tests

The entry point to "Socius Marketing Page Taxonomy" version 1.1.14 is a PHP file that has certain tags in its header comment area
115 characters long description:
Adds custom taxonomies for product categories and areas served. Be sure to update your permalinks after activation.

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 plugin1,362 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP6140761,014
CSS4113245
SVG200103

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity31.00
▷ Minimum class complexity31.00
▷ Maximum class complexity31.00
Average method complexity5.29
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions21
▷ Named functions21100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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