63% contentstudio

Code Review | ContentStudio

WordPress plugin ContentStudio scored63%from 54 tests.

About plugin

  • Plugin page: contentstudio
  • Plugin version: 1.2.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.1
  • WordPress version: 6.3.1
  • First release: Aug 12, 2020
  • Latest release: Feb 20, 2023
  • Number of updates: 47
  • Update frequency: every 29.1 days
  • Top authors: contentstudio (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

1,000+ active /40,428 total downloads

Benchmarks

Plugin footprint 47% 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.22MB] [CPU: ▼10.79ms] Passed 4 tests

Analyzing server-side resources used by ContentStudio
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.87 ▲0.4045.56 ▲3.05
Dashboard /wp-admin3.52 ▲0.1854.05 ▼14.41
Posts /wp-admin/edit.php3.64 ▲0.2853.55 ▼3.46
Add New Post /wp-admin/post-new.php6.10 ▲0.2291.87 ▼28.32
Media Library /wp-admin/upload.php3.44 ▲0.2249.19 ▲10.91

Server storage [IO: ▲0.30MB] [DB: ▲0.00MB] 67% from 3 tests

A short overview of filesystem and database impact
Just a few items left to fix
  • Illegal file modification detected: 2 files (0.00KB) outside of "wp-content/plugins/contentstudio/" and "wp-content/uploads/"
    • (new file) "wp-content/plugins/contentstudio/assets/icon-256\303\227256.png"
    • (new file) "wp-content/plugins/contentstudio/assets/icon-128\303\227128.png"
Filesystem: 18 new files
Database: 1 new table, 6 new options
New tables
wp_seo
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

ContentStudio: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲6114.73 ▲0.371.89 ▲0.3544.05 ▲2.13
Dashboard /wp-admin2,211 ▲345.59 ▼0.0987.09 ▼0.4378.89 ▲37.03
Posts /wp-admin/edit.php2,119 ▲191.97 ▲0.0236.92 ▼4.5433.77 ▼5.30
Add New Post /wp-admin/post-new.php1,694 ▲16621.81 ▼1.25769.87 ▲152.7868.21 ▲19.19
Media Library /wp-admin/upload.php1,416 ▲134.25 ▲0.07102.84 ▲4.6679.65 ▲32.41

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method ContentStudio::uninstall() should not be called statically
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_seo
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means 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
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/contentstudio/page.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/contentstudio/contentstudio-plugin.php:31

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, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
1 plugin tags: contentstudio provides you with powerful blogging social media tools to keep your audience hooked by streamlining the process for you to discover and share engaging content on multiple blogging social media networks

contentstudio/contentstudio-plugin.php 85% from 13 tests

"ContentStudio" version 1.2.9's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 219 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("contentstudio.php" instead of "contentstudio-plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin1,782 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP22352831,206
CSS303233
LESS3202230
SVG30285
JavaScript261428

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity169.00
▷ Minimum class complexity169.00
▷ Maximum class complexity169.00
Average method complexity4.43
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods49
▷ Static methods00.00%
▷ Public methods4897.96%
▷ Protected methods00.00%
▷ Private methods12.04%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 0.21MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-772x250.png57.28KB17.67KB▼ 69.15%
assets/img/logo.png13.04KB5.99KB▼ 54.05%
assets/icon-256×256.png5.91KB2.96KB▼ 49.85%
assets/banner-1544x500.png136.01KB38.25KB▼ 71.88%
assets/icon-128×128.png2.94KB1.55KB▼ 47.11%