10% moby-blog

Code Review | Moby Blog

WordPress plugin Moby Blog scored10%from 54 tests.

About plugin

  • Plugin page: moby-blog
  • Plugin version: 1.1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.5
  • WordPress version: 6.3.1
  • First release: Apr 11, 2016
  • Latest release: Mar 13, 2017
  • Number of updates: 37
  • Update frequency: every 9.4 days
  • Top authors: restartlabs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,121 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/moby-blog/models/post.php+6
    Methods with the same name as their class will not be constructors in a future version of PHP; RES_JSON_API_Post has a deprecated constructor

Server metrics [RAM: ▼1.65MB] [CPU: ▼54.32ms] Passed 4 tests

An overview of server-side resources used by Moby Blog
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.33 ▼1.126.84 ▼38.53
Dashboard /wp-admin2.35 ▼0.956.80 ▼40.65
Posts /wp-admin/edit.php2.36 ▼1.006.47 ▼46.09
Add New Post /wp-admin/post-new.php2.35 ▼3.538.64 ▼92.02
Media Library /wp-admin/upload.php2.35 ▼0.878.42 ▼26.09

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 34 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Moby Blog
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,961 ▲20414.02 ▼0.3916.67 ▲14.3943.46 ▼5.17
Dashboard /wp-admin2,222 ▲344.84 ▼1.0497.84 ▼2.4982.51 ▲40.13
Posts /wp-admin/edit.php2,105 ▲161.98 ▼0.0735.07 ▼6.4935.43 ▼2.44
Add New Post /wp-admin/post-new.php1,679 ▲13722.40 ▲4.24699.03 ▲77.6857.21 ▼0.97
Media Library /wp-admin/upload.php1,404 ▲164.24 ▲0.0597.22 ▼1.3774.91 ▲30.10

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/moby-blog/models/post.php+6
    Methods with the same name as their class will not be constructors in a future version of PHP; RES_JSON_API_Post has a deprecated constructor
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
8 plugin tags: android, mobile app, mobyblog, api restfull, windows phone...

moby-blog/res-json-api.php 85% from 13 tests

"Moby Blog" version 1.1.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("moby-blog.php" instead of "res-json-api.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 512 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin3,549 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP185158363,259
CSS2352160
PO File1202268
JavaScript36662

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity30.27
▷ Minimum class complexity1.00
▷ Maximum class complexity127.00
Average method complexity4.09
▷ Minimum method complexity1.00
▷ Maximum method complexity67.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods142
▷ Static methods10.70%
▷ Public methods13091.55%
▷ Protected methods64.23%
▷ Private methods64.23%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants880.00%
▷ Class constants220.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
6 PNG files occupy 0.46MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon.png199.56KB66.96KB▼ 66.45%
assets/back.png0.22KB0.20KB▼ 8.77%
singletons/data/mobyblog-128.png6.26KB6.37KB0.00%
singletons/data/mobyblog-20.png1.28KB1.26KB▼ 1.38%
screenshot.png132.70KB52.99KB▼ 60.07%